API Reference
Create Order — EVM & Starknet
The unified create-order endpoint, non-custodial branch. When network is an EVM or Starknet chain, Rails returns the unsigned createOrder params and the client’s own wallet submits the transaction.
POST
Create Order is a single endpoint —
POST /v1/sender/orders. Rails
dispatches on the network you pass:
- Sui — custodial. Rails returns a deposit address / PTB (see Create Order).
- EVM & Starknet — non-custodial (this page). Rails never takes
custody, holds keys, or pays gas. It assembles the exact
createOrderparameters your wallet needs — the Gateway address, live rate, token, amount, and the encrypted recipient blob — and records the order for status tracking.
approve()s the Gateway and calls createOrder(...) with
the returned params. After submitting, report the on-chain orderId back via
Submit On-chain Order; Rails polls
the settlement aggregator and webhooks you on every status change.
The
rate returned is a live LP quote — a snapshot. Submit promptly. An order
created above the LP’s ceiling rate times out and auto-refunds to the order
creator (returnAddress).Header Parameters
Unique API key issued manually through Telegram.
Request Body
The settlement chain identifier. EVM:
ethereum, base, polygon,
arbitrum-one, bnb-smart-chain, celo, lisk, scroll. Non-EVM:
starknet.The stablecoin symbol to send (
USDC, USDT, and CNGN on some chains).
Must be enabled on the selected network.The token amount to convert, in human units (e.g.
"100.00").A locked quote id from Get Rate. Preferred
over a raw
rate. (For EVM/Starknet the live LP rate is also re-quoted
server-side at settlement.)A raw rate — used only when
rateId is omitted.The wallet of the order creator — the wallet that will call
createOrder.
Refunds return here, and it is the default sender-fee recipient. Must match
the chain’s address format (EVM 20-byte hex, or a Starknet felt).How to compute your (the integrator’s) fee:
percent (default) or fixed.Used when
feeMode is percent — your fee as a percentage of the order
amount (e.g. 1.5 = 1.5%).Used when
feeMode is fixed — a flat fee in the order’s token (e.g.
2 = 2 USDC). Must be less than amount.The address that receives your fee on-chain (the Gateway’s
senderFeeRecipient). Required whenever a fee is set. Same address format as
the chain.A staged beneficiary id from
Create Recipient. Preferred over
an inline
recipient.Payout beneficiary details — used only when
recipientId is omitted.
Destination fiat ISO code (
NGN, KES, …).Payout institution code from
/v1/institutions/{currency_code}.Payout account number / wallet handle.
Exact account name of record.
Bank transfer memo.
Optional preferred LP provider id.
Response
Response state (
success).Human-readable message.
Rails order id (UUID). Use it in the submit callback and status lookups.
The unsigned
createOrder arguments. All integers are decimal strings
(uint256 amount, uint96/u128 rate).
Chain identifier.
evm or starknet.Chain id (EVM decimal id, or the Starknet SN_MAIN felt).
Chain id in
0x hex.Gateway proxy — the
approve() + createOrder() target.Token contract to send.
Token symbol.
Token decimals.
Order amount in token subunits.
amount + senderFee in token subunits. Approve this on the token
before calling createOrder — the Gateway pulls amount + senderFee.Rate as fixed-point (fiat-per-token × 100).
Fee recipient address.
Sender fee in token subunits.
Refund target — equals
returnAddress.Base64 RSA-encrypted recipient blob (the Gateway
messageHash argument).Destination fiat code.
Eligible LP provider ids.