Agents & API
Endpoints
Conventions
The machine-readable description of every endpoint is the OpenAPI 3.1 file at https://oxley-agents.web3bandit.workers.dev/v1/openapi.json.
Base URLhttps://oxley-agents.web3bandit.workers.dev. Every path starts with /v1.AuthenticationSend Authorization: Bearer <key> on every call except POST /v1/keys.FormatRequests with a body are JSON (content-type: application/json). Responses are JSON. An answer can carry fields beyond those listed here; ignore the ones you do not use.AmountsToken amounts are in base units, sent as decimal strings. USDC has 6 decimals, so 1 USDC is "1000000". HYPE has 18.Addresses0x addresses. Elysium is its own chain, with chain id 99901.StepsBuilds return steps: the transactions to send, in order. Each step has a kind (approval or transaction), a label and a tx with chainId, from, to, data, value (a decimal string) and sometimes gas. Every step comes back unsigned. Your agent signs and sends them.
All endpoints
| Method and path | What it does |
|---|---|
| POST /v1/keys | Issue an API key for a signed message. |
| DELETE /v1/keys/self | Revoke the key in use. |
| GET /v1/me | Your tier, limits, 30-day volume, next tier and how far away it is. |
| GET /v1/swap/tokens | The tokens Swap lists on Elysium. |
| GET /v1/swap/price | An indicative price: the best route of 0x and Nest. |
| POST /v1/swap/build | Build a swap, unsigned. |
| GET /v1/swap/status | Whether a sent swap succeeded. |
| GET /v1/bridge/config | The chains, tokens and lanes the bridge offers. |
| POST /v1/bridge/quote | Quote a transfer, every hop. |
| POST /v1/bridge/build | Build the first leg of a transfer, unsigned. |
| POST /v1/bridge/status | Follow a bridge transaction. |
| POST /v1/report | Report a transaction so it counts toward your volume. |
Errors
A failed call returns a JSON body with an error code and a reason in plain words. A call over a limit also returns a retry-after header.
| Status | Meaning |
|---|---|
| 400 | The request is malformed: a field is missing or invalid. A bad integratorFee is 400 with the code INVALID_INTEGRATOR_FEE. |
| 401 | The key is missing, unknown or revoked. On POST /v1/keys, the signature is not the address’s. |
| 403 | The key is valid but the request is not allowed. |
| 404 | No such endpoint, or a buildId that is not this key’s. |
| 409 | POST /v1/keys only: the address already holds 3 live keys. |
| 422 | oxley’s checks refused the request: no route, or a sender that holds less than the amount. |
| 429 | Over a limit. Wait retry-after seconds, then try again. |
| 502 | An answer from a provider failed one of oxley’s safety checks, so the build was stopped. |
| 503 | A provider or service the call needs is unavailable. Try again shortly. |
{
"error": "INVALID_REQUEST",
"reason": "sellAmount must be a whole number of base units, as a string."
}GET /v1/me
Returns your key’s tier, its limits, your volume over the last 30 days, the next tier and how far away it is. Counts as a read.
The answer has owner (the address the key was issued to), tier, volume30dUsd, feePayingVolume30dUsd (the part that moves your tier), limits (quotesPerMinute, buildsPerMinute, quotesPerDay, readsPerMinute, bridgeQuotesPerMinute, bridgeQuotesPerDay, bridgeBuildsPerMinute, bridgeBuildsPerDay and maxIntegratorFeeBps) and, below the top tier, nextTier (name, minVolumeUsd and remainingUsd, the fee-paying volume still missing).
Errors: 401 for a missing, unknown or revoked key, and 429 over the read limit.
curl https://oxley-agents.web3bandit.workers.dev/v1/me \
-H "Authorization: Bearer $OXLEY_API_KEY"GET /v1/swap/tokens
Returns the tokens Swap lists on Elysium in tokens, each with its address, symbol, name and decimals. Use addresses from this list. HYPE, Elysium’s native token, appears with the placeholder address 0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee. Counts as a read.
Errors: 401 and 429.
curl https://oxley-agents.web3bandit.workers.dev/v1/swap/tokens \
-H "Authorization: Bearer $OXLEY_API_KEY"GET /v1/swap/price
Returns an indicative price for a swap on Elysium, from the best route of 0x and Nest. The answer has buyAmount (what you would receive), minBuyAmount (the minimum after slippage), liquidityAvailable (false when no route exists), sources and each fee. Quoted amounts are after every fee. The price is a guide, not a transaction: build the swap to get one. Counts as a quote.
Errors: 400 for an invalid parameter, 401, 429 over the quote limit and 503 when a provider is unavailable.
sellTokenAddress of the token to sell.buyTokenAddress of the token to buy.sellAmountThe amount to sell, in base units, as a string.takerOptional. The address that would send the swap.slippageBpsOptional. Slippage in basis points, from 10 to 500 (0.1% to 5%).integratorFeeRecipientOptional. With integratorFeeBps, the integrator fee to price in. See Integrator fees.integratorFeeBpsOptional. The fee in basis points.
# USDC and HYPE are token addresses from GET /v1/swap/tokens; WALLET is your address.
curl -G https://oxley-agents.web3bandit.workers.dev/v1/swap/price \
-H "Authorization: Bearer $OXLEY_API_KEY" \
--data-urlencode "sellToken=$USDC" \
--data-urlencode "buyToken=$HYPE" \
--data-urlencode "sellAmount=10000000" \
--data-urlencode "taker=$WALLET"POST /v1/swap/build
Builds a swap and returns it unsigned: buildId, quote and steps. The steps are the ones to send, in order: an integrator fee transfer first when you sent a fee and the route is Nest’s pools, then the approvals still needed, then the swap itself as the last step. The quote is what they are built from: it has buyAmount, minBuyAmount (the minimum out), each fee and expiresAt, the Unix time in seconds after which the quote must be refreshed. Counts as a build.
Send the steps in order, and wait for each to land before the next. Keep the buildId: it ties the swap to your volume.
Errors: 400 for an invalid request, 422 when no route is available or the taker holds less than the sell amount, 502 when a safety check stops the build, 429 over the build limit and 503 when a provider is unavailable.
sellTokenAddress of the token to sell.buyTokenAddress of the token to buy.sellAmountThe amount to sell, in base units, as a string.takerThe address that will send the swap.slippageBpsOptional. Slippage in basis points, from 10 to 500 (0.1% to 5%).integratorFeeOptional. { recipient, bps }. See Integrator fees.
{
"sellToken": "0xb47c4c8f73f009cc0c0d3f92b388d13e293f0b65",
"buyToken": "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee",
"sellAmount": "10000000",
"taker": "0x1111111111111111111111111111111111111111",
"slippageBps": 50
}GET /v1/swap/status
Returns whether a swap you sent succeeded, in status: pending until it is mined, then success or reverted. Pass the buildId as well and a successful swap also counts toward your volume; the answer then carries report, the outcome described under Reporting volume. Counts as a read.
Errors: 400 for an invalid hash, 401 and 429.
hashThe hash of the transaction you sent.buildIdOptional. The buildId the transaction was built with.
curl -G https://oxley-agents.web3bandit.workers.dev/v1/swap/status \
-H "Authorization: Bearer $OXLEY_API_KEY" \
--data-urlencode "hash=$SWAP_HASH" \
--data-urlencode "buildId=$BUILD_ID"GET /v1/bridge/config
Returns the chains, tokens and lanes the bridge offers. Use it to choose chain ids and token addresses for a quote, and to see whether a lane is available. Counts as a read.
Errors: 401, 429 and 503.
curl https://oxley-agents.web3bandit.workers.dev/v1/bridge/config \
-H "Authorization: Bearer $OXLEY_API_KEY"POST /v1/bridge/quote
Quotes a transfer and returns the quote for every hop in legs. Some transfers take two hops, for example a swap to USDC and then the bridge. Each hop shows what you receive (amountOut), the minimum you accept (minAmountOut) and the fees, and names the provider that quoted it. Quoted amounts are after every fee. When you send an integratorFee, the answer carries it as integratorFee. Counts as a quote.
The body is an intent: who sends, what from where to where, and how much.
Errors: 400 for an invalid intent, 422 when no route is available for the pair, 429 over the quote limit and 503 when a provider is unavailable.
accountThe wallet that sends the transfer.recipientWho receives on the destination chain.sourceChainIdThe chain the transfer starts on: an EVM chain. Transfers that start on Solana are not available in v1. Chain ids come from GET /v1/bridge/config.destinationChainIdThe chain it ends on. Elysium is 99901.tokenInThe token sent, as listed for the source chain in the config. The native token uses its placeholder address.tokenOutThe token received, as listed for the destination chain in the config.amountInThe amount sent, in base units of tokenIn, as a string.slippageBpsOptional. Slippage in basis points, from 10 to 500 (0.1% to 5%).gasTopUpOptional. true also delivers a little HYPE on Elysium for gas when bridging to Elysium. See Bridge.integratorFeeOptional. { recipient, bps }. See Integrator fees.
{
"account": "0x1111111111111111111111111111111111111111",
"recipient": "0x1111111111111111111111111111111111111111",
"sourceChainId": 8453,
"destinationChainId": 99901,
"tokenIn": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"tokenOut": "0xb47c4c8f73f009cc0c0d3f92b388d13e293f0b65",
"amountIn": "100000000",
"slippageBps": 50
}POST /v1/bridge/build
Builds the first leg of a transfer and returns it unsigned: buildId, plan, prepared and steps, and integratorFee when you sent one. The steps are the ones to send, in order: an integrator fee transfer first when there is one, then the approvals still needed, then the transaction as the last step. Counts as a build.
The body is the same intent as the quote, plus an optional via: the provider that quoted the first leg, as the quote names it.
A later hop is built with its own intent once the first lands. The answer carries the intent for the next hop. When the first hop has been delivered, send that intent to this endpoint. Follow the first hop with POST /v1/bridge/status.
Errors: 400 for an invalid intent, 422 when no route is available or the sender holds less than the amount, 502 when a safety check stops the build, 429 over the build limit and 503 when a provider is unavailable.
accountThe wallet that sends the transfer.recipientWho receives on the destination chain.sourceChainIdThe chain the transfer starts on: an EVM chain. Transfers that start on Solana are not available in v1. Chain ids come from GET /v1/bridge/config.destinationChainIdThe chain it ends on. Elysium is 99901.tokenInThe token sent, as listed for the source chain in the config. The native token uses its placeholder address.tokenOutThe token received, as listed for the destination chain in the config.amountInThe amount sent, in base units of tokenIn, as a string.slippageBpsOptional. Slippage in basis points, from 10 to 500 (0.1% to 5%).gasTopUpOptional. true also delivers a little HYPE on Elysium for gas when bridging to Elysium. See Bridge.integratorFeeOptional. { recipient, bps }. See Integrator fees.viaOptional. The provider that quoted the first leg.
{
"account": "0x1111111111111111111111111111111111111111",
"recipient": "0x1111111111111111111111111111111111111111",
"sourceChainId": 8453,
"destinationChainId": 99901,
"tokenIn": "0x833589fcd6edb6e08f4c7c32d4f71b54bda02913",
"tokenOut": "0xb47c4c8f73f009cc0c0d3f92b388d13e293f0b65",
"amountIn": "100000000",
"slippageBps": 50,
"integratorFee": {
"recipient": "0x2222222222222222222222222222222222222222",
"bps": 25
}
}POST /v1/bridge/status
Follows a bridge transaction you sent. The answer has source (the state of the source transaction: pending, success, reverted or unknown), delivery (the progress of the delivery once the source has succeeded) and retryAfterMs, how long to wait before asking again. Pass the buildId and a successful transaction also counts toward your volume; the answer then carries report. Counts as a read.
Errors: 400 for an invalid body, 401, 429 and 503.
chainIdThe chain the transaction was sent on.txHashThe transaction hash.kindOptional. What to follow. Omit it for an ordinary bridge transfer. Other values are swap (a hop on one chain), relay (a direct Relay leg), orbit-deposit and orbit-withdrawal (Elysium’s own bridge with HyperEVM).buildIdOptional. The buildId the transaction was built with.
{
"chainId": 8453,
"txHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}POST /v1/report
Reports a transaction you sent so it counts toward your volume. The server checks the receipt before it counts. The answer has outcome, volume30dUsd and feePayingVolume30dUsd. See Reporting volume for the checks, the outcomes and how a USD value is found.
Errors: 400 for an invalid body, 401, 404 when no build of this key has that id, 429 and 503.
buildIdThe buildId the transaction was built with.txHashThe hash of the transaction you sent.
{
"buildId": "<buildId from the build>",
"txHash": "0xaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}