Method Name
private/transfer_positions
private/transfer_positions
Transfers multiple positions from one subaccount to another, owned by the same wallet.
The transfer is executed as a an RFQ. A mock RFQ is first created from the taker parameters, followed by a maker quote and a taker execute.
The leg amounts, prices and instrument name must be the same in both param payloads.
Fee is not charged and a zero max_fee
must be signed.
Every leg in the transfer must be a position reduction for either maker or taker (or both).
History: for position transfer history, use the private/get_trade_history
RPC (not private/get_erc20_transfer_history
).
Required minimum session key permission level is admin
Parameters
wallet
string
required
Public key (wallet) of the account |
maker_params
object
required
Maker quote parameters and signature |
maker_params.direction
string
required
Quote direction, buy means trading each leg at its direction, sell means trading each leg in the opposite direction.enum buy sell |
maker_params.max_fee
string
required
Max fee ($ for the full trade). Request will be rejected if the supplied max fee is below the estimated fee for this trade. |
maker_params.nonce
integer
required
Unique nonce defined as a concatenated UTC timestamp in ms and random number up to 6 digits (e.g. 1695836058725001, where 001 is the random number) |
maker_params.signature
string
required
Ethereum signature of the quote |
maker_params.signature_expiry_sec
integer
required
Unix timestamp in seconds. Expiry MUST be at least 310 seconds from now. Once time till signature expiry reaches 300 seconds, the quote will be considered expired. This buffer is meant to ensure the trade can settle on chain in case of a blockchain congestion. |
maker_params.signer
string
required
Owner wallet address or registered session key that signed the quote |
maker_params.subaccount_id
integer
required
Subaccount ID |
maker_params.legs
array of objects
required
Quote legs |
maker_params.legs[].amount
string
required
Amount in units of the base |
maker_params.legs[].direction
string
required
Leg direction enum buy sell |
maker_params.legs[].instrument_name
string
required
Instrument name |
maker_params.legs[].price
string
required
Leg price |
taker_params
object
required
Taker quote execution parameters and signature |
taker_params.direction
string
required
Quote direction, buy means trading each leg at its direction, sell means trading each leg in the opposite direction.enum buy sell |
taker_params.max_fee
string
required
Max fee ($ for the full trade). Request will be rejected if the supplied max fee is below the estimated fee for this trade. |
taker_params.nonce
integer
required
Unique nonce defined as a concatenated UTC timestamp in ms and random number up to 6 digits (e.g. 1695836058725001, where 001 is the random number) |
taker_params.signature
string
required
Ethereum signature of the quote |
taker_params.signature_expiry_sec
integer
required
Unix timestamp in seconds. Expiry MUST be at least 310 seconds from now. Once time till signature expiry reaches 300 seconds, the quote will be considered expired. This buffer is meant to ensure the trade can settle on chain in case of a blockchain congestion. |
taker_params.signer
string
required
Owner wallet address or registered session key that signed the quote |
taker_params.subaccount_id
integer
required
Subaccount ID |
taker_params.legs
array of objects
required
Quote legs |
taker_params.legs[].amount
string
required
Amount in units of the base |
taker_params.legs[].direction
string
required
Leg direction enum buy sell |
taker_params.legs[].instrument_name
string
required
Instrument name |
taker_params.legs[].price
string
required
Leg price |
Response
id
string or integer
required
|
result
object
required
|
result.maker_quote
object
required
Created maker-side quote object |
result.maker_quote.cancel_reason
string
required
Cancel reason, if any enum user_request insufficient_margin signed_max_fee_too_low mmp_trigger cancel_on_disconnect session_key_deregistered subaccount_withdrawn rfq_no_longer_open compliance |
result.maker_quote.creation_timestamp
integer
required
Creation timestamp in ms since Unix epoch |
result.maker_quote.direction
string
required
Quote direction enum buy sell |
result.maker_quote.fee
string
required
Fee paid for this quote (if executed) |
result.maker_quote.is_transfer
boolean
required
Whether the order was generated through private/transfer_position |
result.maker_quote.label
string
required
User-defined label, if any |
result.maker_quote.last_update_timestamp
integer
required
Last update timestamp in ms since Unix epoch |
result.maker_quote.legs_hash
string
required
Hash of the legs of the best quote to be signed by the taker. |
result.maker_quote.liquidity_role
string
required
Liquidity role enum maker taker |
result.maker_quote.max_fee
string
required
Signed max fee |
result.maker_quote.mmp
boolean
required
Whether the quote is tagged for market maker protections (default false) |
result.maker_quote.nonce
integer
required
Nonce |
result.maker_quote.quote_id
string
required
Quote ID |
result.maker_quote.rfq_id
string
required
RFQ ID |
result.maker_quote.signature
string
required
Ethereum signature of the quote |
result.maker_quote.signature_expiry_sec
integer
required
Unix timestamp in seconds |
result.maker_quote.signer
string
required
Owner wallet address or registered session key that signed the quote |
result.maker_quote.status
string
required
Status enum open filled cancelled expired |
result.maker_quote.subaccount_id
integer
required
Subaccount ID |
result.maker_quote.tx_hash
string or null
required
Blockchain transaction hash (only for executed quotes) |
result.maker_quote.tx_status
string or null
required
Blockchain transaction status (only for executed quotes) enum requested pending settled reverted ignored timed_out |
result.maker_quote.legs
array of objects
required
Quote legs |
result.maker_quote.legs[].amount
string
required
Amount in units of the base |
result.maker_quote.legs[].direction
string
required
Leg direction enum buy sell |
result.maker_quote.legs[].instrument_name
string
required
Instrument name |
result.maker_quote.legs[].price
string
required
Leg price |
result.taker_quote
object
required
Created taker-side quote object |
result.taker_quote.cancel_reason
string
required
Cancel reason, if any enum user_request insufficient_margin signed_max_fee_too_low mmp_trigger cancel_on_disconnect session_key_deregistered subaccount_withdrawn rfq_no_longer_open compliance |
result.taker_quote.creation_timestamp
integer
required
Creation timestamp in ms since Unix epoch |
result.taker_quote.direction
string
required
Quote direction enum buy sell |
result.taker_quote.fee
string
required
Fee paid for this quote (if executed) |
result.taker_quote.is_transfer
boolean
required
Whether the order was generated through private/transfer_position |
result.taker_quote.label
string
required
User-defined label, if any |
result.taker_quote.last_update_timestamp
integer
required
Last update timestamp in ms since Unix epoch |
result.taker_quote.legs_hash
string
required
Hash of the legs of the best quote to be signed by the taker. |
result.taker_quote.liquidity_role
string
required
Liquidity role enum maker taker |
result.taker_quote.max_fee
string
required
Signed max fee |
result.taker_quote.mmp
boolean
required
Whether the quote is tagged for market maker protections (default false) |
result.taker_quote.nonce
integer
required
Nonce |
result.taker_quote.quote_id
string
required
Quote ID |
result.taker_quote.rfq_id
string
required
RFQ ID |
result.taker_quote.signature
string
required
Ethereum signature of the quote |
result.taker_quote.signature_expiry_sec
integer
required
Unix timestamp in seconds |
result.taker_quote.signer
string
required
Owner wallet address or registered session key that signed the quote |
result.taker_quote.status
string
required
Status enum open filled cancelled expired |
result.taker_quote.subaccount_id
integer
required
Subaccount ID |
result.taker_quote.tx_hash
string or null
required
Blockchain transaction hash (only for executed quotes) |
result.taker_quote.tx_status
string or null
required
Blockchain transaction status (only for executed quotes) enum requested pending settled reverted ignored timed_out |
result.taker_quote.legs
array of objects
required
Quote legs |
result.taker_quote.legs[].amount
string
required
Amount in units of the base |
result.taker_quote.legs[].direction
string
required
Leg direction enum buy sell |
result.taker_quote.legs[].instrument_name
string
required
Instrument name |
result.taker_quote.legs[].price
string
required
Leg price |
Example
{request_example_shell}
{request_example_javascript}
{request_example_python}
The above command returns JSON structured like this:
{response_example_json}