SDK Configuration
SDKConfig
Pass a config object to the ArgyrosSDK constructor:
Options
| Option | Type | Default | Required | Description |
|---|---|---|---|---|
apiKey | string | — | yes | Your Argyros API key. Sent as Authorization: Bearer <apiKey>. |
chain | "solana" | "fogo" | "solana" | no | Target chain. Appended as ?chain=<value> to every request. |
baseUrl | string | "https://api.argyros.xyz" | no | API base URL. Trailing slashes are stripped automatically. |
timeout | number | 30000 | no | Per-request timeout in milliseconds. Uses AbortController. |
retries | number | 2 | no | Number of retry attempts for retryable errors (429, 5xx, network failures). Total attempts = retries + 1. |
Chains
| Chain | Description | Token Standard |
|---|---|---|
"solana" | Solana mainnet | SPL Token / Token-2022 |
"fogo" | Fogo chain | SPL Token |
chain parameter is sent as a query parameter on every API call. It determines which set of DEX markets the aggregator searches.
Retry Behavior
The SDK retries automatically on transient failures:| Condition | Retried | Backoff |
|---|---|---|
| HTTP 429 (rate limit) | yes | Exponential: 1s, 2s, 4s, … (max 8s) |
| HTTP 5xx (server error) | yes | Exponential: 1s, 2s, 4s, … (max 8s) |
| Network error / timeout | yes | Exponential: 1s, 2s, 4s, … (max 8s) |
| HTTP 400 (bad request) | no | — |
| HTTP 401/403 (auth) | no | — |
| HTTP 404 (no route) | no | — |
retries: 2, the SDK makes up to 3 attempts before throwing.