GET /target-volume/quote
Speeds, durations and prices for one target on one pool.
Prices here are indicative: initialize prices the
order again from the chain, and that price is the one to pay.
Query
| Param | Required | Description |
|---|---|---|
sTokenAddress | yes | Token mint. |
sPoolId | yes | Pool from pools. |
nTargetUsd | yes | One of 20000, 50000, 100000, 200000, 500000, 1000000. |
Response 200
{
"nTargetUsd": 100000,
"speeds": [
{ "eSpeed": "FAST", "nDurationHours": 0.5, "nPriceSol": 5.1 },
{ "eSpeed": "6H", "nDurationHours": 6, "nPriceSol": 4.6 },
{ "eSpeed": "24H", "nDurationHours": 24, "nPriceSol": 4.2 }
]
}
| Field | Description |
|---|---|
speeds | Only the speeds this target can run at on this pool. |
nDurationHours | How long the order runs. Fixed for every speed except FAST. |
nPriceSol | Price in SOL. |
Errors
| Status | Meaning |
|---|---|
400 | Invalid public key, or nTargetUsd not on offer. |
403 | Target Volume is not available for this account. |
404 | sPoolId is not a pool of this token. |
422 | This target cannot be quoted on this pool; message says why. |
503 | The chain or the SOL price could not be read in time; retry. |
Example
curl "$BASE_URL/target-volume/quote?sTokenAddress=$MINT&sPoolId=$POOL&nTargetUsd=100000" \
-H "Authorization: Bearer $ACCESS" \
-H "x-user-id: $USER_ID"