API Reference
Explore all nine public integration endpoints, grouped by resource.
Use your deployment origin and an x-api-key integration credential. This reference renders the complete reviewed public OpenAPI 3.1.0 contract. Authentication guide · Download OpenAPI.
Build, order and submit currently return 503 TRADING_NOT_CONFIGURED. The interactive playground is unavailable until a service origin is configured.
Request samples require your origin, key and valid input values. Captured response fixtures are labeled; responses without a verified example show Empty while retaining their schemas.
Pools
Lists pools discovered by the configured grapl indexer. Supply quoteMint to find a direct pair. Empty results return 200. Catalog inclusion is not a quote or an execution guarantee; use /v1/swap/quote to compare supported pools for an amount.
IntegrationKeyx-api-key<token>Integration credential issued to your team. All team keys share the same request quota.
mint*stringFind indexed grapl pools containing this SPL mint on either side.
^[1-9A-HJ-NP-Za-km-z]{32,44}$solana-addressquoteMint?stringOptional second mint. Restricts discovery to the direct pair, in either order.
^[1-9A-HJ-NP-Za-km-z]{32,44}$solana-addresslimit?integerMaximum pools per page, ordered by pool address.
1 <= value <= 10020cursor?stringExclusive pool address cursor returned as nextCursor. Pagination is a live catalog view.
^[1-9A-HJ-NP-Za-km-z]{32,44}$solana-addressSuccessful request
application/json- response
success*truetruedata*curl -X GET '{GRAPL_API_ORIGIN}/v1/pools?mint=string' \ -H 'x-api-key: {GRAPL_API_KEY}'Swaps
Provide the input/output mint pair and amount; no pool address is required or accepted. Compares up to 50 indexed candidates using the native engine, including fees and liquidity. ExactIn maximizes output; ExactOut minimizes input. Ties use lexical pool address order. 404 NO_POOLS means the pair is absent; 422 NO_QUOTABLE_POOL means no supported pool can fill the whole amount. RPC failures abort selection with 503, never a partial ranking. Exceeding 50 candidates returns 422 TOO_MANY_POOLS.
IntegrationKeyx-api-key<token>Integration credential issued to your team. All team keys share the same request quota.
inputMint*stringSPL mint to sell. Paired with outputMint for automatic pool selection.
^[1-9A-HJ-NP-Za-km-z]{32,44}$solana-addressoutputMint*stringSPL mint to receive; must differ from inputMint.
^[1-9A-HJ-NP-Za-km-z]{32,44}$solana-addressamount*stringPositive u64 token atoms as a decimal string. Input atoms for ExactIn; output atoms for ExactOut. For 6 decimals, 1000000 represents one token.
^[1-9][0-9]{0,19}$length <= 20swapMode?stringExactIn fixes input and maximizes output; ExactOut fixes output and minimizes input.
"ExactIn""ExactIn""ExactOut"slippageBps?integerSlippage tolerance in basis points: 50 = 0.5%. Sets the returned threshold; does not change which pool has the best nominal quote.
0 <= value <= 1000050taker?stringOptional wallet context for future contextual adapters. Providing an address is not proof of authorization.
^[1-9A-HJ-NP-Za-km-z]{32,44}$solana-addressSuccessful request
application/json- response
success*truetruedata*curl -X GET '{GRAPL_API_ORIGIN}/v1/swap/quote?inputMint=string&outputMint=string&amount=string' \ -H 'x-api-key: {GRAPL_API_KEY}'Captured from the API's isolated selection-test fakes. Test addresses and amounts illustrate the contract, not a market quote. Only the random request ID is normalized.
{ "success": true, "data": { "pool": "11111111111111111111111111111111", "requestId": "isolated-selection-fixture", "inputMint": "11111111111111111111111111111111", "outputMint": "So11111111111111111111111111111111111111112", "inAmount": "1000", "outAmount": "990", "otherAmountThreshold": "985", "swapMode": "ExactIn", "slippageBps": 50, "priceImpactPct": null, "contextSlot": "42", "expiresAt": "2026-10-12T12:30:10.000Z", "fees": [ { "mint": "11111111111111111111111111111111", "amount": "3", "kind": "trade" } ] }}Returns account privileges and instruction bytes for wallet signing when the execution bridge is configured. Currently returns 503 TRADING_NOT_CONFIGURED.
IntegrationKeyx-api-key<token>Integration credential issued to your team. All team keys share the same request quota.
inputMint*stringSPL mint to sell. Paired with outputMint for automatic pool selection.
^[1-9A-HJ-NP-Za-km-z]{32,44}$solana-addressoutputMint*stringSPL mint to receive; must differ from inputMint.
^[1-9A-HJ-NP-Za-km-z]{32,44}$solana-addressamount*stringPositive u64 token atoms as a decimal string. Input atoms for ExactIn; output atoms for ExactOut. For 6 decimals, 1000000 represents one token.
^[1-9][0-9]{0,19}$length <= 20swapMode?stringExactIn fixes input and maximizes output; ExactOut fixes output and minimizes input.
"ExactIn""ExactIn""ExactOut"slippageBps?integerSlippage tolerance in basis points: 50 = 0.5%. Sets the returned threshold; does not change which pool has the best nominal quote.
0 <= value <= 1000050taker*stringWallet that will sign the swap; required for instruction construction.
^[1-9A-HJ-NP-Za-km-z]{32,44}$solana-addressSuccessful request
application/json- response
success*truetruedata*curl -X GET '{GRAPL_API_ORIGIN}/v1/swap/build?inputMint=string&outputMint=string&amount=string&taker=string' \ -H 'x-api-key: {GRAPL_API_KEY}'Execution-bridge contract. Currently returns 503 TRADING_NOT_CONFIGURED; a quote alone does not produce a transaction.
IntegrationKeyx-api-key<token>Integration credential issued to your team. All team keys share the same request quota.
inputMint*stringSPL mint to sell. Paired with outputMint for automatic pool selection.
^[1-9A-HJ-NP-Za-km-z]{32,44}$solana-addressoutputMint*stringSPL mint to receive; must differ from inputMint.
^[1-9A-HJ-NP-Za-km-z]{32,44}$solana-addressamount*stringPositive u64 token atoms as a decimal string. Input atoms for ExactIn; output atoms for ExactOut. For 6 decimals, 1000000 represents one token.
^[1-9][0-9]{0,19}$length <= 20swapMode?stringExactIn fixes input and maximizes output; ExactOut fixes output and minimizes input.
"ExactIn""ExactIn""ExactOut"slippageBps?integerSlippage tolerance in basis points: 50 = 0.5%. Sets the returned threshold; does not change which pool has the best nominal quote.
0 <= value <= 1000050taker?stringOptional wallet context for future contextual adapters. Providing an address is not proof of authorization.
^[1-9A-HJ-NP-Za-km-z]{32,44}$solana-addressSuccessful request
application/json- response
success*truetruedata*curl -X GET '{GRAPL_API_ORIGIN}/v1/swap/order?inputMint=string&outputMint=string&amount=string' \ -H 'x-api-key: {GRAPL_API_KEY}'Submit a signed transaction. Submission does not establish confirmation or settlement.
IntegrationKeyx-api-key<token>Integration credential issued to your team. All team keys share the same request quota.
application/json- body
signedTransaction*string^[A-Za-z0-9+/]+={0,2}$4 <= length <= 1644Successful request
application/json- response
success*truetruedata*curl -X POST '{GRAPL_API_ORIGIN}/v1/swap/submit' \ -H 'x-api-key: {GRAPL_API_KEY}' \ -H 'Content-Type: application/json' \ -d '{ "signedTransaction": "string"}'Transaction status
Reads the configured observer. A not_observed result is not proof that a transaction is absent, pending or failed on chain.
IntegrationKeyx-api-key<token>Integration credential issued to your team. All team keys share the same request quota.
signature*string^[1-9A-HJ-NP-Za-km-z]{64,88}$Successful request
application/json- response
success*truetruedata*curl -X GET '{GRAPL_API_ORIGIN}/v1/swap/status/string' \ -H 'x-api-key: {GRAPL_API_KEY}'Stream finalized observations from the configured chain/program. Resume using Last-Event-ID. Not-observed is not proof of absence on chain. Each connection counts as one API request; frames do not. Stop on complete.
IntegrationKeyx-api-key<token>Integration credential issued to your team. All team keys share the same request quota.
signature*string^[1-9A-HJ-NP-Za-km-z]{64,88}$last-event-id?stringLast delivered transaction.status event ID. Replays newer persisted events before following live updates.
^[1-9][0-9]{0,18}$SSE: snapshot, transaction.status (with id), heartbeat, complete, reconnect or stream-error. Only finalized/failed outcomes are observed currently.
response?stringtext/event-streamcurl -X GET '{GRAPL_API_ORIGIN}/v1/swap/status/string/events' \ -H 'x-api-key: {GRAPL_API_KEY}'Usage & limits
Read-only snapshot for the authenticated key’s team, shared by all its keys. Does not consume trading quota and remains available after exhaustion. Fixed UTC minute and calendar-month windows; concurrent requests can change these values immediately.
IntegrationKeyx-api-key<token>Integration credential issued to your team. All team keys share the same request quota.
Successful request
application/json- response
success*truetruedata*curl -X GET '{GRAPL_API_ORIGIN}/v1/rate-limits' \ -H 'x-api-key: {GRAPL_API_KEY}'Read-only snapshot for the authenticated key’s team, shared by all its keys. Does not consume trading quota and remains available after exhaustion. Fixed UTC minute and calendar-month windows; concurrent requests can change these values immediately.
IntegrationKeyx-api-key<token>Integration credential issued to your team. All team keys share the same request quota.
Successful request
application/json- response
success*truetruedata*curl -X GET '{GRAPL_API_ORIGIN}/v1/usage' \ -H 'x-api-key: {GRAPL_API_KEY}'