orderStatuses
Sends a request to the node to see the status of a collection of orders.
Parameters
Parameter | Type | Description |
---|---|---|
order_hash | Vec<B256> | A vector of order hashes |
Result
Vec<OrderStatus>
Returns an array of OrderStatus
. The status is one of the following variants:
Filled
Pending
Blocked { "token" : 0x..., "approval_needed": 123, "balance_needed": 1243 }
MissingGas { "needed": 1241, "max_set": 1000 }
NotFound
: Indicates that the order does not exist or the node has yet to have received it.
Code Sample
curl "NODE_URL" -X POST -H "Content-Type: application/json" -d '
{
"jsonrpc": "2.0",
"id": 0,
"method": "angstrom_orderStatus",
"params": [
"0xb19c9e1e51300d56a6b0b0ce4865ec105e8e2e830d328c06bf55ed6ccf6174de"
"0xc32c9e1e51300d56a6b0b0ce445827105e8e2e830d328c06bf55ed6ccf6174ee"
"0xe39c9e1e51300d56a6b0b0ce4865ec105e84645621839306bf55ed6ccf6174a1"
]
}
'
Response
{
"jsonrpc": "2.0",
"id": "0",
"result": [
{
"is_success": true,
"data": "Pending",
"msg": ""
},
{
"is_success": true,
"data": {
"Blocked": {
"token": 0x2342,
"approval_needed": 1243,
"balance_needed": 1243,
}
},
"msg": ""
},
{
"is_success": true,
"data": "Filled",
"msg": ""
}
]
}