Skip to main content

Submit up to 25 signed quotes in one request

POST/trade/submit/batch

Runs each submission exactly as POST /trade/submit would and answers every one, in request order. http_status is the status that submit would have answered and response its body; headers (Retry-After, the rate-limit counts) belong to the batch response only. One submission's outcome never affects another's, so the batch's 200 says nothing about any item: read each http_status.

Requires your general (tik_) key; a reporting key is refused.

Refused as a whole, with nothing read or broadcast:

  • The same quote_id in more than one submission: 400 invalid_request. A buy's legs are alternatives, so splitting one quote across submissions would buy twice. Send each quote once, with all of the legs you sign for it in one submission.

  • No submissions, more than 25, an unknown field, or any submission POST /trade/submit would refuse as malformed: 400 invalid_request.

  • A body over 100 KB (100,000 bytes): 413 { error: "Payload too large" }, answered before the request reaches this operation. The limit of 25 assumes about one signed Solana leg per submission; submissions that sign several legs (a sell quoted with several legs) leave room for fewer, so size such batches smaller.

  • The rate limit: 429. Every submission counts once against a per-organisation budget (600 a minute) and a per-IP budget (300 a minute), on top of the per-request limits of every trade route. The batch is charged before any submission runs, and a batch refused with 429 still counts in full against the per-organisation budget, and against the per-IP budget too when that is the one that refused. A batch refused with 400 costs nothing against these two budgets.

    Size each batch to the budget you have left, and after a 429 wait for Retry-After. On a 200 the X-RateLimit-* headers describe the last of the two budgets charged (the per-IP one in production), counted in submissions.

Per submission, beside every answer POST /trade/submit can give:

  • 422 batch_leg_unsupported with that quote_index: a batch carries same-chain Solana legs only (chain: sol, quoted without origin_chain or payout_chain). Submit any other leg through POST /trade/submit. Nothing was sent. This check runs before the checks POST /trade/submit makes, so such a submission answers 422 even when it is also stale, bound to another organisation's fee or refused by screening; submitting it alone gives those answers.
  • 503 batch_deadline_exceeded: the batch ran long enough that this submission was not started, so nothing was sent and the batch could answer in time. Submit it again, alone or in a new batch, while its quote is live.
  • 500 internal_error: the submission failed unexpectedly. It may have been sent before it failed, so read GET /quote/{quote_id}/status before re-quoting. The single route's 500 body reads Internal server error; inside a batch it is internal_error.

Request​

Responses​

One result per submission, in request order.