Skip to main content

Reference

Use this page for Solana-specific endpoint details, common parameters, and troubleshooting notes.

Base URL: https://solana-beta-api.odos.xyz


Information Endpoints

GET /info/tokens/101

Returns supported Solana tokens.

Query ParameterDescription
order_byOptional sort field, such as tvl or symbol.
order_dirOptional sort direction: asc or desc.
limitOptional maximum number of tokens to return.
offsetOptional pagination offset.

Example:

curl "https://solana-beta-api.odos.xyz/info/tokens/101?limit=50&order_by=tvl&order_dir=desc"

GET /info/liquidity-sources/101

Returns supported Solana liquidity sources for routing.

Example:

curl "https://solana-beta-api.odos.xyz/info/liquidity-sources/101"

Use the returned source id values with sourceWhitelist in quote requests. Source IDs are case-sensitive and currently use hyphenated names such as raydium-amm; do not convert them to underscore-separated names.

GET /healthcheck

Returns service health information.

Example:

curl "https://solana-beta-api.odos.xyz/healthcheck"

Common Parameters

The public Solana endpoint does not require authentication.

Chain ID

Always use 101 for Solana mainnet.

{
"chainId": 101
}

Token Addresses

Solana token addresses are base58 token mint addresses, not 0x EVM addresses. Verify supported tokens with /info/tokens/101.

{
"USDC": "EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v",
"SOL": "So11111111111111111111111111111111111111112"
}

Amounts

Input and output amounts are strings in base units.

TokenDecimalsExample
SOL91000000000 = 1 SOL
USDC61000000 = 1 USDC

User Address

userAddr must be a valid, case-sensitive Solana wallet address. Provide userAddr in quote requests that will be assembled, and use the same userAddr in the assemble request.

Slippage

slippageLimitPercent is expressed as a percentage.

ValueMeaning
0.10.1% max slippage
0.50.5% max slippage
1.01.0% max slippage

RFQs

RFQs are currently disabled by default for Solana. The disableRFQs field is accepted for compatibility, but setting it is not required for normal Solana quote requests.

{
"disableRFQs": true
}

Simulation

Solana quote requests do not perform server-side transaction simulation. Assemble requests accept simulate: true and may return a simulation object, but that simulation metadata is currently informational and not an authoritative execution guarantee. Treat simulation.isSuccess: false as metadata, not by itself as a failed assembled transaction.

Transaction Assembly

Assembly returns transaction.data, base64-encoded Solana transaction data. Decode and sign this value with the wallet that matches userAddr, then submit it through your Solana RPC provider.

Source Filtering

Use sourceWhitelist to restrict routing to specific liquidity sources. Get supported source IDs from /info/liquidity-sources/101 and pass them exactly as returned.

{
"sourceWhitelist": ["raydium-amm", "orca"]
}

sourceBlacklist is accepted by the request schema, but source exclusion is not currently applied by Solana routing. Prefer sourceWhitelist when source filtering is required.


Error Format

Errors include a human-readable message, an error code, and a trace ID.

{
"detail": "Human readable error message",
"errorCode": 2999,
"traceId": "unique-trace-identifier"
}

Include the traceId when reporting issues to support.


Troubleshooting

Quote Expired

Quotes are valid for 60 seconds. If assembly fails because the quote is stale, request a new quote and assemble the new pathId.

Invalid Token or Wallet Address

Solana addresses must be valid base58 addresses. If a token fails validation, check that it appears in /info/tokens/101. If userAddr fails validation, confirm that it is a Solana wallet address, not an EVM address.

No Route or Insufficient Liquidity

If no route is available, try:

  • Reducing the input amount
  • Using a different token pair
  • Checking whether both tokens are supported by /info/tokens/101
  • Removing overly restrictive source filters

Retryable Errors

Validation errors usually require a request change before retrying. Server-side errors, timeouts, and generic routing failures can usually be retried with exponential backoff.

Rate Limits

If you receive 429 Too Many Requests, respect the Retry-After header and retry with exponential backoff and jitter. See Rate limits for general guidance.


Production Notes

  • Cache token lists and liquidity sources; they change less frequently than quotes.
  • Do not cache quotes for execution. Quote pathId values expire quickly.
  • Do not modify assembled transaction.data or rebuild the transaction message.
  • Show users clear messages for expired quotes, unsupported tokens, insufficient liquidity, and rate limits.
  • Confirm submitted transactions through your Solana RPC provider.