Method Name
private/transfer_position
private/transfer_position
Transfers a positions from one subaccount to another, owned by the same wallet.
The transfer is executed as a pair of orders crossing each other.
The maker order is created first, followed by a taker order crossing it.
The order amounts, limit prices and instrument name must be the same for both orders.
Fee is not charged and a zero max_fee
must be signed.
The maker order is forcibly considered to be reduce_only
, meaning it can only reduce the position size.
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 order parameters and signature. Maximum transfer amount is limited by the size of the maker position. Transfers that increase the maker's position size are not allowed. |
maker_params.amount
string
required
Order amount in units of the base |
maker_params.direction
string
required
Order direction enum buy sell |
maker_params.instrument_name
string
required
Instrument name |
maker_params.limit_price
string
required
Limit price in quote currency. This field is still required for market orders because it is a component of the signature. However, market orders will not leave a resting order in the book in case of a partial fill. |
maker_params.max_fee
string
required
Max fee per unit of volume, denominated in units of the quote currency (usually USDC).Order will be rejected if the supplied max fee is below the estimated fee for this order. |
maker_params.nonce
integer
required
Unique nonce defined as |
maker_params.signature
string
required
Ethereum signature of the order |
maker_params.signature_expiry_sec
integer
required
Unix timestamp in seconds. Order signature becomes invalid after this time, and the system will cancel the order.Expiry MUST be at least 5 min from now. |
maker_params.signer
string
required
Owner wallet address or registered session key that signed order |
maker_params.subaccount_id
integer
required
Subaccount ID |
taker_params
object
required
Taker order parameters and signature |
taker_params.amount
string
required
Order amount in units of the base |
taker_params.direction
string
required
Order direction enum buy sell |
taker_params.instrument_name
string
required
Instrument name |
taker_params.limit_price
string
required
Limit price in quote currency. This field is still required for market orders because it is a component of the signature. However, market orders will not leave a resting order in the book in case of a partial fill. |
taker_params.max_fee
string
required
Max fee per unit of volume, denominated in units of the quote currency (usually USDC).Order will be rejected if the supplied max fee is below the estimated fee for this order. |
taker_params.nonce
integer
required
Unique nonce defined as |
taker_params.signature
string
required
Ethereum signature of the order |
taker_params.signature_expiry_sec
integer
required
Unix timestamp in seconds. Order signature becomes invalid after this time, and the system will cancel the order.Expiry MUST be at least 5 min from now. |
taker_params.signer
string
required
Owner wallet address or registered session key that signed order |
taker_params.subaccount_id
integer
required
Subaccount ID |
Response
id
string or integer
required
|
result
object
required
|
result.maker_order
object
required
|
result.maker_order.amount
string
required
Order amount in units of the base |
result.maker_order.average_price
string
required
Average fill price |
result.maker_order.cancel_reason
string
required
If cancelled, reason behind order cancellation enum user_request mmp_trigger insufficient_margin signed_max_fee_too_low cancel_on_disconnect ioc_or_market_partial_fill session_key_deregistered subaccount_withdrawn compliance trigger_failed |
result.maker_order.creation_timestamp
integer
required
Creation timestamp (in ms since Unix epoch) |
result.maker_order.direction
string
required
Order direction enum buy sell |
result.maker_order.filled_amount
string
required
Total filled amount for the order |
result.maker_order.instrument_name
string
required
Instrument name |
result.maker_order.is_transfer
boolean
required
Whether the order was generated through private/transfer_position |
result.maker_order.label
string
required
Optional user-defined label for the order |
result.maker_order.last_update_timestamp
integer
required
Last update timestamp (in ms since Unix epoch) |
result.maker_order.limit_price
string
required
Limit price in quote currency |
result.maker_order.max_fee
string
required
Max fee in units of the quote currency |
result.maker_order.mmp
boolean
required
Whether the order is tagged for market maker protections |
result.maker_order.nonce
integer
required
Unique nonce defined as |
result.maker_order.order_fee
string
required
Total order fee paid so far |
result.maker_order.order_id
string
required
Order ID |
result.maker_order.order_status
string
required
Order status enum open filled cancelled expired untriggered |
result.maker_order.order_type
string
required
Order type enum limit market |
result.maker_order.quote_id
string or null
required
Quote ID if the trade was executed via RFQ |
result.maker_order.signature
string
required
Ethereum signature of the order |
result.maker_order.signature_expiry_sec
integer
required
Signature expiry timestamp |
result.maker_order.signer
string
required
Owner wallet address or registered session key that signed order |
result.maker_order.subaccount_id
integer
required
Subaccount ID |
result.maker_order.time_in_force
string
required
Time in force enum gtc post_only fok ioc |
result.maker_order.replaced_order_id
string or null
If replaced, ID of the order that was replaced |
result.maker_order.trigger_price
string or null
(Required for trigger orders) Index or Market price to trigger order at |
result.maker_order.trigger_price_type
string or null
(Required for trigger orders) Trigger with Index or Mark Price enum mark index |
result.maker_order.trigger_reject_message
string or null
(Required for trigger orders) Error message if error occured during trigger |
result.maker_order.trigger_type
string or null
(Required for trigger orders) Stop-loss or Take-profit. enum stoploss takeprofit |
result.maker_trade
object
required
|
result.maker_trade.direction
string
required
Order direction enum buy sell |
result.maker_trade.index_price
string
required
Index price of the underlying at the time of the trade |
result.maker_trade.instrument_name
string
required
Instrument name |
result.maker_trade.is_transfer
boolean
required
Whether the trade was generated through private/transfer_position |
result.maker_trade.label
string
required
Optional user-defined label for the order |
result.maker_trade.liquidity_role
string
required
Role of the user in the trade enum maker taker |
result.maker_trade.mark_price
string
required
Mark price of the instrument at the time of the trade |
result.maker_trade.order_id
string
required
Order ID |
result.maker_trade.quote_id
string or null
required
Quote ID if the trade was executed via RFQ |
result.maker_trade.realized_pnl
string
required
Realized PnL for this trade |
result.maker_trade.realized_pnl_excl_fees
string
required
Realized PnL for this trade using cost accounting that excludes fees |
result.maker_trade.subaccount_id
integer
required
Subaccount ID |
result.maker_trade.timestamp
integer
required
Trade timestamp (in ms since Unix epoch) |
result.maker_trade.trade_amount
string
required
Amount filled in this trade |
result.maker_trade.trade_fee
string
required
Fee for this trade |
result.maker_trade.trade_id
string
required
Trade ID |
result.maker_trade.trade_price
string
required
Price at which the trade was filled |
result.maker_trade.transaction_id
string
required
The transaction id of the related settlement transaction |
result.maker_trade.tx_hash
string or null
required
Blockchain transaction hash |
result.maker_trade.tx_status
string
required
Blockchain transaction status enum requested pending settled reverted ignored timed_out |
result.taker_order
object
required
|
result.taker_order.amount
string
required
Order amount in units of the base |
result.taker_order.average_price
string
required
Average fill price |
result.taker_order.cancel_reason
string
required
If cancelled, reason behind order cancellation enum user_request mmp_trigger insufficient_margin signed_max_fee_too_low cancel_on_disconnect ioc_or_market_partial_fill session_key_deregistered subaccount_withdrawn compliance trigger_failed |
result.taker_order.creation_timestamp
integer
required
Creation timestamp (in ms since Unix epoch) |
result.taker_order.direction
string
required
Order direction enum buy sell |
result.taker_order.filled_amount
string
required
Total filled amount for the order |
result.taker_order.instrument_name
string
required
Instrument name |
result.taker_order.is_transfer
boolean
required
Whether the order was generated through private/transfer_position |
result.taker_order.label
string
required
Optional user-defined label for the order |
result.taker_order.last_update_timestamp
integer
required
Last update timestamp (in ms since Unix epoch) |
result.taker_order.limit_price
string
required
Limit price in quote currency |
result.taker_order.max_fee
string
required
Max fee in units of the quote currency |
result.taker_order.mmp
boolean
required
Whether the order is tagged for market maker protections |
result.taker_order.nonce
integer
required
Unique nonce defined as |
result.taker_order.order_fee
string
required
Total order fee paid so far |
result.taker_order.order_id
string
required
Order ID |
result.taker_order.order_status
string
required
Order status enum open filled cancelled expired untriggered |
result.taker_order.order_type
string
required
Order type enum limit market |
result.taker_order.quote_id
string or null
required
Quote ID if the trade was executed via RFQ |
result.taker_order.signature
string
required
Ethereum signature of the order |
result.taker_order.signature_expiry_sec
integer
required
Signature expiry timestamp |
result.taker_order.signer
string
required
Owner wallet address or registered session key that signed order |
result.taker_order.subaccount_id
integer
required
Subaccount ID |
result.taker_order.time_in_force
string
required
Time in force enum gtc post_only fok ioc |
result.taker_order.replaced_order_id
string or null
If replaced, ID of the order that was replaced |
result.taker_order.trigger_price
string or null
(Required for trigger orders) Index or Market price to trigger order at |
result.taker_order.trigger_price_type
string or null
(Required for trigger orders) Trigger with Index or Mark Price enum mark index |
result.taker_order.trigger_reject_message
string or null
(Required for trigger orders) Error message if error occured during trigger |
result.taker_order.trigger_type
string or null
(Required for trigger orders) Stop-loss or Take-profit. enum stoploss takeprofit |
result.taker_trade
object
required
|
result.taker_trade.direction
string
required
Order direction enum buy sell |
result.taker_trade.index_price
string
required
Index price of the underlying at the time of the trade |
result.taker_trade.instrument_name
string
required
Instrument name |
result.taker_trade.is_transfer
boolean
required
Whether the trade was generated through private/transfer_position |
result.taker_trade.label
string
required
Optional user-defined label for the order |
result.taker_trade.liquidity_role
string
required
Role of the user in the trade enum maker taker |
result.taker_trade.mark_price
string
required
Mark price of the instrument at the time of the trade |
result.taker_trade.order_id
string
required
Order ID |
result.taker_trade.quote_id
string or null
required
Quote ID if the trade was executed via RFQ |
result.taker_trade.realized_pnl
string
required
Realized PnL for this trade |
result.taker_trade.realized_pnl_excl_fees
string
required
Realized PnL for this trade using cost accounting that excludes fees |
result.taker_trade.subaccount_id
integer
required
Subaccount ID |
result.taker_trade.timestamp
integer
required
Trade timestamp (in ms since Unix epoch) |
result.taker_trade.trade_amount
string
required
Amount filled in this trade |
result.taker_trade.trade_fee
string
required
Fee for this trade |
result.taker_trade.trade_id
string
required
Trade ID |
result.taker_trade.trade_price
string
required
Price at which the trade was filled |
result.taker_trade.transaction_id
string
required
The transaction id of the related settlement transaction |
result.taker_trade.tx_hash
string or null
required
Blockchain transaction hash |
result.taker_trade.tx_status
string
required
Blockchain transaction status enum requested pending settled reverted ignored timed_out |
Example
{request_example_shell}
{request_example_javascript}
{request_example_python}
The above command returns JSON structured like this:
{response_example_json}