Transfers work with test keys today. A live key gets
503 FEATURE_DISABLED with
details.reason: "LIVE_TRANSFERS_UNAVAILABLE", and moves nothing. To use cash on the other venue
with a live key, place the order with POST /v1/orders: it pays from the other venue in the same
call. See Paying from the other venue.POST /v1/transfers/quoteshows the fee, what arrives, the minimum and what you can send.POST /v1/transferscreates the transfer and returns the message to sign.POST /v1/transfers/{id}/executesends your signature. Lean then moves the cash.
trade and route scopes. Quoting and reading need
read. See Authentication.
1
Quote the transfer
A quote never moves cash, and it answers even when the amount is below the minimum or above
what is available, so you can show the numbers before you ask. Check
warnings before you
create the transfer.2
Create the transfer
client_transfer_id is your ID for the transfer. Sending the same body again returns the same
transfer, so a retry never moves cash twice. The same ID with a different body is
409 CONFLICT, and details.transfer_id names the original.The transfer starts as awaiting_authorization, and amount_usd is held on from_venue at
once: available_usd in GET /v1/balances drops by it. authorization says what to sign:3
Sign and execute
Sign each If the account has enabled trading in the Lean app, send
typed_data exactly as returned, then send the signatures in the same order:{ "authorization": "delegated" }
instead and Lean signs with the account’s delegated signer.The transfer moves to pending, then completed once the cash arrives. Sending the same
signatures again returns the transfer and moves nothing.Follow a transfer
GET /v1/transfers/{id} returns one transfer. GET /v1/transfers lists the key’s account’s
transfers, newest first. Pass limit (1 to 100) and the next_cursor from the previous page as
cursor to read further back.