HomeDocumentationAPI Reference
Log In
API Reference

Transfer Position

Method Name

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

walletstringrequired
Public key (wallet) of the account
maker_paramsobjectrequired
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.amountstringrequired
Order amount in units of the base
maker_params.directionstringrequired
Order direction
enum buysell
maker_params.instrument_namestringrequired
Instrument name
maker_params.limit_pricestringrequired
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_feestringrequired
Max fee PER contract, denominated in USDC.
For resting orders (maker orders), max_fee must be > 2 x max(taker_fee, maker_fee) x spot_price + extra_fee / amount.For crossing orders (taker order), max_fee must be > maker max_fee + base_fee / fill_amount.
Note, in this calculation, regardless of the custom account taker / maker fees, the standard taker / maker fees are used.
The max(limit_price, index_price) is used to calculate the notional volume.
maker_params.nonceintegerrequired
Unique nonce defined as (UTC_timestamp in ms)(random_number_up_to_3_digits) (e.g. 1695836058725001, where 001 is the random number).
Note, using a random number beyond 3 digits will cause JSON serialization to fail.
maker_params.signaturestringrequired
Ethereum signature of the order
maker_params.signature_expiry_secintegerrequired
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.signerstringrequired
Owner wallet address or registered session key that signed order
maker_params.subaccount_idintegerrequired
Subaccount ID
taker_paramsobjectrequired
Taker order parameters and signature
taker_params.amountstringrequired
Order amount in units of the base
taker_params.directionstringrequired
Order direction
enum buysell
taker_params.instrument_namestringrequired
Instrument name
taker_params.limit_pricestringrequired
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_feestringrequired
Max fee PER contract, denominated in USDC.
For resting orders (maker orders), max_fee must be > 2 x max(taker_fee, maker_fee) x spot_price + extra_fee / amount.For crossing orders (taker order), max_fee must be > maker max_fee + base_fee / fill_amount.
Note, in this calculation, regardless of the custom account taker / maker fees, the standard taker / maker fees are used.
The max(limit_price, index_price) is used to calculate the notional volume.
taker_params.nonceintegerrequired
Unique nonce defined as (UTC_timestamp in ms)(random_number_up_to_3_digits) (e.g. 1695836058725001, where 001 is the random number).
Note, using a random number beyond 3 digits will cause JSON serialization to fail.
taker_params.signaturestringrequired
Ethereum signature of the order
taker_params.signature_expiry_secintegerrequired
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.signerstringrequired
Owner wallet address or registered session key that signed order
taker_params.subaccount_idintegerrequired
Subaccount ID

Response

idstring or integerrequired
resultobjectrequired
result.maker_orderobjectrequired
result.maker_order.amountstringrequired
Order amount in units of the base
result.maker_order.average_pricestringrequired
Average fill price
result.maker_order.cancel_reasonstringrequired
If cancelled, reason behind order cancellation
enum user_requestmmp_triggerinsufficient_marginsigned_max_fee_too_lowcancel_on_disconnectioc_or_market_partial_fillsession_key_deregisteredsubaccount_withdrawncompliancetrigger_failedvalidation_failedalgo_completed
result.maker_order.creation_timestampintegerrequired
Creation timestamp (in ms since Unix epoch)
result.maker_order.directionstringrequired
Order direction
enum buysell
result.maker_order.filled_amountstringrequired
Total filled amount for the order
result.maker_order.instrument_namestringrequired
Instrument name
result.maker_order.is_transferbooleanrequired
Whether the order was generated through private/transfer_position
result.maker_order.labelstringrequired
Optional user-defined label for the order
result.maker_order.last_update_timestampintegerrequired
Last update timestamp (in ms since Unix epoch)
result.maker_order.limit_pricestringrequired
Limit price in quote currency
result.maker_order.max_feestringrequired
Max fee PER contract, denominated in USDC.Max fee must be > 2 x max(taker_fee, maker_fee) x spot_price + extra_fee / amount.If the order crosses the book, it must be >= 2 x max(taker_fee, maker_fee) x spot_price + base_fee / fill_amount + extra_fee / amount.Note, in this calculation, regardless of the account taker / maker fees, the standard taker / maker fees are used.
result.maker_order.mmpbooleanrequired
Whether the order is tagged for market maker protections
result.maker_order.nonceintegerrequired
Unique nonce defined as (UTC_timestamp in ms)(random_number_up_to_3_digits) (e.g. 1695836058725001, where 001 is the random number)
result.maker_order.order_feestringrequired
Order fee paid so far
result.maker_order.order_idstringrequired
Order ID
result.maker_order.order_statusstringrequired
Order status
enum openfilledcancelledexpireduntriggeredalgo_active
result.maker_order.order_typestringrequired
Order type
enum limitmarket
result.maker_order.quote_idstring or nullrequired
Quote ID if the trade was executed via RFQ
result.maker_order.signaturestringrequired
Ethereum signature of the order
result.maker_order.signature_expiry_secintegerrequired
Signature expiry timestamp
result.maker_order.signerstringrequired
Owner wallet address or registered session key that signed order
result.maker_order.subaccount_idintegerrequired
Subaccount ID
result.maker_order.time_in_forcestringrequired
Time in force
enum gtcpost_onlyfokioc
result.maker_order.algo_duration_secinteger or null
Total execution window in seconds
result.maker_order.algo_num_slicesinteger or null
Number of child executions
result.maker_order.algo_slices_completedinteger or null
Number of slices executed so far
result.maker_order.algo_typestring or null
Algo order type (twap or vwap)
enum twap
result.maker_order.extra_feestring or null
(Optional) Extra fee in USDC added to the total final fee paid by user (must be between 0.000001 and 1,000 USDC).
result.maker_order.replaced_order_idstring or null
If replaced, ID of the order that was replaced
result.maker_order.signed_limit_pricestring or null
The original limit price that the user signed. Only set when the order was adjusted (i.e., for post-only orders with reject_post_only=false that would have crossed). Used for on-chain submission.
result.maker_order.trigger_pricestring or null
(Required for trigger orders) Index or Market price to trigger order at
result.maker_order.trigger_price_typestring or null
(Required for trigger orders) Trigger with Index or Mark Price
enum markindex
result.maker_order.trigger_reject_messagestring or null
(Required for trigger orders) Error message if error occured during trigger
result.maker_order.trigger_typestring or null
(Required for trigger orders) Stop-loss or Take-profit.
enum stoplosstakeprofit
result.maker_tradeobjectrequired
result.maker_trade.directionstringrequired
Order direction
enum buysell
result.maker_trade.expected_rebatestringrequired
Expected rebate for this trade
result.maker_trade.extra_feestringrequired
Extra fee in USDC added by the referring client (included in trade fee)
result.maker_trade.index_pricestringrequired
Index price of the underlying at the time of the trade
result.maker_trade.instrument_namestringrequired
Instrument name
result.maker_trade.is_transferbooleanrequired
Whether the trade was generated through private/transfer_position
result.maker_trade.labelstringrequired
Optional user-defined label for the order
result.maker_trade.liquidity_rolestringrequired
Role of the user in the trade
enum makertaker
result.maker_trade.mark_pricestringrequired
Mark price of the instrument at the time of the trade
result.maker_trade.order_idstringrequired
Order ID
result.maker_trade.quote_idstring or nullrequired
Quote ID if the trade was executed via RFQ
result.maker_trade.realized_pnlstringrequired
Realized PnL for this trade
result.maker_trade.realized_pnl_excl_feesstringrequired
Realized PnL for this trade using cost accounting that excludes fees
result.maker_trade.rfq_idstring or nullrequired
RFQ ID if the trade was executed via RFQ
result.maker_trade.subaccount_idintegerrequired
Subaccount ID
result.maker_trade.timestampintegerrequired
Trade timestamp (in ms since Unix epoch)
result.maker_trade.trade_amountstringrequired
Amount filled in this trade
result.maker_trade.trade_feestringrequired
Base_fee (only takers) + unit_fee (adjusted via rebates / discounts) + extra_fee (set by referrring client))
result.maker_trade.trade_idstringrequired
Trade ID
result.maker_trade.trade_pricestringrequired
Price at which the trade was filled
result.maker_trade.transaction_idstringrequired
The transaction id of the related settlement transaction
result.maker_trade.tx_hashstring or nullrequired
Blockchain transaction hash
result.maker_trade.tx_statusstringrequired
Blockchain transaction status
enum requestedpendingsettledrevertedignoredtimed_out
result.taker_orderobjectrequired
result.taker_order.amountstringrequired
Order amount in units of the base
result.taker_order.average_pricestringrequired
Average fill price
result.taker_order.cancel_reasonstringrequired
If cancelled, reason behind order cancellation
enum user_requestmmp_triggerinsufficient_marginsigned_max_fee_too_lowcancel_on_disconnectioc_or_market_partial_fillsession_key_deregisteredsubaccount_withdrawncompliancetrigger_failedvalidation_failedalgo_completed
result.taker_order.creation_timestampintegerrequired
Creation timestamp (in ms since Unix epoch)
result.taker_order.directionstringrequired
Order direction
enum buysell
result.taker_order.filled_amountstringrequired
Total filled amount for the order
result.taker_order.instrument_namestringrequired
Instrument name
result.taker_order.is_transferbooleanrequired
Whether the order was generated through private/transfer_position
result.taker_order.labelstringrequired
Optional user-defined label for the order
result.taker_order.last_update_timestampintegerrequired
Last update timestamp (in ms since Unix epoch)
result.taker_order.limit_pricestringrequired
Limit price in quote currency
result.taker_order.max_feestringrequired
Max fee PER contract, denominated in USDC.Max fee must be > 2 x max(taker_fee, maker_fee) x spot_price + extra_fee / amount.If the order crosses the book, it must be >= 2 x max(taker_fee, maker_fee) x spot_price + base_fee / fill_amount + extra_fee / amount.Note, in this calculation, regardless of the account taker / maker fees, the standard taker / maker fees are used.
result.taker_order.mmpbooleanrequired
Whether the order is tagged for market maker protections
result.taker_order.nonceintegerrequired
Unique nonce defined as (UTC_timestamp in ms)(random_number_up_to_3_digits) (e.g. 1695836058725001, where 001 is the random number)
result.taker_order.order_feestringrequired
Order fee paid so far
result.taker_order.order_idstringrequired
Order ID
result.taker_order.order_statusstringrequired
Order status
enum openfilledcancelledexpireduntriggeredalgo_active
result.taker_order.order_typestringrequired
Order type
enum limitmarket
result.taker_order.quote_idstring or nullrequired
Quote ID if the trade was executed via RFQ
result.taker_order.signaturestringrequired
Ethereum signature of the order
result.taker_order.signature_expiry_secintegerrequired
Signature expiry timestamp
result.taker_order.signerstringrequired
Owner wallet address or registered session key that signed order
result.taker_order.subaccount_idintegerrequired
Subaccount ID
result.taker_order.time_in_forcestringrequired
Time in force
enum gtcpost_onlyfokioc
result.taker_order.algo_duration_secinteger or null
Total execution window in seconds
result.taker_order.algo_num_slicesinteger or null
Number of child executions
result.taker_order.algo_slices_completedinteger or null
Number of slices executed so far
result.taker_order.algo_typestring or null
Algo order type (twap or vwap)
enum twap
result.taker_order.extra_feestring or null
(Optional) Extra fee in USDC added to the total final fee paid by user (must be between 0.000001 and 1,000 USDC).
result.taker_order.replaced_order_idstring or null
If replaced, ID of the order that was replaced
result.taker_order.signed_limit_pricestring or null
The original limit price that the user signed. Only set when the order was adjusted (i.e., for post-only orders with reject_post_only=false that would have crossed). Used for on-chain submission.
result.taker_order.trigger_pricestring or null
(Required for trigger orders) Index or Market price to trigger order at
result.taker_order.trigger_price_typestring or null
(Required for trigger orders) Trigger with Index or Mark Price
enum markindex
result.taker_order.trigger_reject_messagestring or null
(Required for trigger orders) Error message if error occured during trigger
result.taker_order.trigger_typestring or null
(Required for trigger orders) Stop-loss or Take-profit.
enum stoplosstakeprofit
result.taker_tradeobjectrequired
result.taker_trade.directionstringrequired
Order direction
enum buysell
result.taker_trade.expected_rebatestringrequired
Expected rebate for this trade
result.taker_trade.extra_feestringrequired
Extra fee in USDC added by the referring client (included in trade fee)
result.taker_trade.index_pricestringrequired
Index price of the underlying at the time of the trade
result.taker_trade.instrument_namestringrequired
Instrument name
result.taker_trade.is_transferbooleanrequired
Whether the trade was generated through private/transfer_position
result.taker_trade.labelstringrequired
Optional user-defined label for the order
result.taker_trade.liquidity_rolestringrequired
Role of the user in the trade
enum makertaker
result.taker_trade.mark_pricestringrequired
Mark price of the instrument at the time of the trade
result.taker_trade.order_idstringrequired
Order ID
result.taker_trade.quote_idstring or nullrequired
Quote ID if the trade was executed via RFQ
result.taker_trade.realized_pnlstringrequired
Realized PnL for this trade
result.taker_trade.realized_pnl_excl_feesstringrequired
Realized PnL for this trade using cost accounting that excludes fees
result.taker_trade.rfq_idstring or nullrequired
RFQ ID if the trade was executed via RFQ
result.taker_trade.subaccount_idintegerrequired
Subaccount ID
result.taker_trade.timestampintegerrequired
Trade timestamp (in ms since Unix epoch)
result.taker_trade.trade_amountstringrequired
Amount filled in this trade
result.taker_trade.trade_feestringrequired
Base_fee (only takers) + unit_fee (adjusted via rebates / discounts) + extra_fee (set by referrring client))
result.taker_trade.trade_idstringrequired
Trade ID
result.taker_trade.trade_pricestringrequired
Price at which the trade was filled
result.taker_trade.transaction_idstringrequired
The transaction id of the related settlement transaction
result.taker_trade.tx_hashstring or nullrequired
Blockchain transaction hash
result.taker_trade.tx_statusstringrequired
Blockchain transaction status
enum requestedpendingsettledrevertedignoredtimed_out

Example

{request_example_shell}
{request_example_javascript}
{request_example_python}

The above command returns JSON structured like this:

{response_example_json}