Any2Any integrator
The cross-chain aggregator uses a separate host (<aggregator-api-host>). Place orders with X-Integrator-Api-Key.
| Endpoint | Auth | Purpose |
|---|---|---|
GET /api/v2/quote/stream | none | SSE quotes |
POST /api/v1/integrator/orders | X-Integrator-Api-Key | Create order |
POST /api/v1/integrator/orders/:orderNo/request_refund | same | Refund an order you participated in |
Amounts are integer strings in the destination token's smallest unit. slippage is (0, 1); 0.01 = 1%.
Quote
GET /api/v2/quote/stream?src_token_id=&dst_token_id=&amount_in=&slippage= HTTP/1.1
Accept: text/event-stream
Events: channel (one venue), error (one venue failed), done. You can close early.
Create order
POST /api/v1/integrator/orders
X-Integrator-Api-Key: <api_key>
Submit amount_in, min_acceptable_out_amount, and the chosen channel_id from the quote. The key's fee_rate is snapshotted onto the order.
Non-SSE body:
{"code": 0, "msg": "ok", "data": {}}
msg is Any2Any's envelope, not Gel Labs gateway message.
Refund
POST /api/v1/integrator/orders/:orderNo/request_refund
X-Integrator-Api-Key: <api_key>
Only orders that key participated in. Manage keys in the Any2Any integrator console.