database_api.list_limit_orders
Purpose
Retourne une liste d'ordres à cours limité (limit order). Paramètres : start:array ; limit:int ; order:string
startdépend deorder(voir ci-dessous)limitest limité à 1000.orderpeut être l'un des suivants :by_price- tri par prix (price)startest un tableau de deux valeurs :price,order_type
by_account- tri par comptestartest un tableau de deux valeurs :account,order_id
| start (array) | limit (int) | order (string) | | |----------------------------|---------------|-| | [{"base": {"amount": "85405", "precision": 3, "nai": "@@000000021"}, "quote": {"amount": "17192", "precision": 3, "nai": "@@000000013"}}, 0] | 10 | "by_price" | Interroge les 10 premières demandes, tri par prix | | ["alice", 0] | 10 | "by_effective_date" | Interroge les 10 premières demandes, tri par compte |
Voir aussi : Paginated API Methods
Parameters
PARAMETERS
json
{
"start": null,
"limit": 0,
"order": "by_name"
}Example
Example 1
BASH
bash
curl -s https://api.steemit.com \
-H 'Content-Type: application/json' \
--data-binary '{
"jsonrpc": "2.0",
"method": "database_api.list_limit_orders",
"params": {
"start": [
{
"base": {
"amount": "1000",
"precision": 3,
"nai": "@@000000021"
},
"quote": {
"amount": "1",
"precision": 3,
"nai": "@@000000013"
}
},
0
],
"limit": 10,
"order": "by_price"
},
"id": 1
}'Example 2
BASH
bash
curl -s https://api.steemit.com \
-H 'Content-Type: application/json' \
--data-binary '{
"jsonrpc": "2.0",
"method": "database_api.list_limit_orders",
"params": {
"start": [
"alice",
0
],
"limit": 10,
"order": "by_account"
},
"id": 1
}'Response
RESPONSE
json
{
"orders": [
{
"id": 3155591,
"created": "2018-12-05T06:34:21",
"expiration": "2018-12-15T06:34:20",
"seller": "teamsmooth-mm",
"orderid": 2000,
"for_sale": 197714,
"sell_price": {
"base": {
"amount": "198513",
"precision": 3,
"nai": "@@000000021"
},
"quote": {
"amount": "80000",
"precision": 3,
"nai": "@@000000013"
}
}
}
]
}