curl --request POST \
--url https://api.perpo.trade/v1/algo/order \
--header 'Content-Type: application/json' \
--header 'perpo-account-id: <perpo-account-id>' \
--header 'perpo-key: <perpo-key>' \
--header 'perpo-signature: <perpo-signature>' \
--header 'perpo-timestamp: <perpo-timestamp>' \
--data '
[
{
"symbol": "PERP_ETH_USDC",
"algo_type": "BRACKET",
"quantity": 0.0032,
"side": "BUY",
"type": "LIMIT",
"price": 3415.9,
"child_orders": [
{
"symbol": "PERP_ETH_USDC",
"algo_type": "POSITIONAL_TP_SL",
"child_orders": [
{
"symbol": "PERP_ETH_USDC",
"algo_type": "TAKE_PROFIT",
"side": "SELL",
"type": "CLOSE_POSITION",
"trigger_price": 3518.4,
"reduce_only": true
},
{
"symbol": "PERP_ETH_USDC",
"algo_type": "STOP_LOSS",
"side": "SELL",
"type": "CLOSE_POSITION",
"trigger_price": 3313.4,
"reduce_only": true
}
]
}
]
},
{
"symbol": "PERP_NEAR_USDC",
"algo_type": "TP_SL",
"quantity": 5.5,
"trigger_price_type": "MARK_PRICE",
"child_orders": [
{
"symbol": "PERP_NEAR_USDC",
"algo_type": "TAKE_PROFIT",
"side": "SELL",
"type": "MARKET",
"trigger_price": 3.365,
"reduce_only": true
},
{
"symbol": "PERP_NEAR_USDC",
"algo_type": "STOP_LOSS",
"side": "SELL",
"type": "MARKET",
"trigger_price": 3.36,
"reduce_only": true
}
]
},
{
"symbol": "PERP_NEAR_USDC",
"algo_type": "POSITIONAL_TP_SL",
"trigger_price_type": "MARK_PRICE",
"child_orders": [
{
"symbol": "PERP_NEAR_USDC",
"algo_type": "TAKE_PROFIT",
"side": "SELL",
"type": "CLOSE_POSITION",
"trigger_price_type": "MARK_PRICE",
"trigger_price": 4.05,
"reduce_only": true
},
{
"symbol": "PERP_NEAR_USDC",
"algo_type": "STOP_LOSS",
"side": "SELL",
"type": "CLOSE_POSITION",
"trigger_price_type": "MARK_PRICE",
"trigger_price": 3.95,
"reduce_only": true
}
]
}
]
'