Websocket REST (GET) REST (POST)
Connect
WEBSOCKET [GATEWAY_WEBSOCKET_ENDPOINT]
Message
Copy {
"type" : "subaccount_orders" ,
"sender" : "0x7a5ec2748e9065794491a8d29dcf3f9edb8d7c43000000000000000000000000" ,
"product_id" : 1
}
GET [GATEWAY_REST_ENDPOINT]/query?type=subaccount_orders&sender={sender}&product_id={product_id}
POST [GATEWAY_REST_ENDPOINT]/query
Body
Copy {
"type" : "subaccount_orders" ,
"sender" : "0x7a5ec2748e9065794491a8d29dcf3f9edb8d7c43000000000000000000000000" ,
"product_id" : 1
}
Copy {
"status" : "success" ,
"data" : {
"sender" : "0x7a5ec2748e9065794491a8d29dcf3f9edb8d7c43000000000000000000000000" ,
"product_id" : 1 ,
"orders" : [
{
"product_id" : 1 ,
"sender" : "0x7a5ec2748e9065794491a8d29dcf3f9edb8d7c43000000000000000000000000" ,
"price_x18" : "1000000000000000000" ,
"amount" : "1000000000000000000" ,
"expiration" : "2000000000" ,
"nonce" : "1" ,
"order_type" : "default" ,
"unfilled_amount" : "1000000000000000000" ,
"digest" : "0x0000000000000000000000000000000000000000000000000000000000000000" ,
"placed_at" : 1682437739 ,
"order_type" : "ioc"
}
]
} ,
"request_type" : "query_subaccount_orders"
}
Copy {
"status" : "success" ,
"data" : {
"sender" : "0x7a5ec2748e9065794491a8d29dcf3f9edb8d7c43000000000000000000000000" ,
"product_orders" : [
{
"product_id" : 1 ,
"orders" : [
{
"product_id" : 1 ,
"sender" : "0x7a5ec2748e9065794491a8d29dcf3f9edb8d7c43000000000000000000000000" ,
"price_x18" : "1000000000000000000" ,
"amount" : "1000000000000000000" ,
"expiration" : "2000000000" ,
"nonce" : "1" ,
"order_type" : "default" ,
"unfilled_amount" : "1000000000000000000" ,
"digest" : "0x0000000000000000000000000000000000000000000000000000000000000000" ,
"placed_at" : 1682437739 ,
"order_type" : "ioc"
}
]
} ,
{
"product_id" : 2 ,
"orders" : []
}
]
} ,
"request_type" : "query_orders"
}