跳到正文

database_api.list_escrows ​

since HF14

Purpose ​

返回托管(escrow)列表。参数:start:array;limit:int;order:string

  • start 取决于 order(见下文)
  • limit 最大 1000。
  • order 可取以下值:
    • by_from_id - 按 id 排序
      • start 为两个值组成的数组:account、escrow_id
    • by_ratification_deadline - 按批准截止时间(ratification deadline)排序
      • start 为三个值组成的数组:is_approved、timestamp、escrow_id

| start (array) | limit (int) | order (string) | | |----------------------------|---------------|-| | ["alice", 99] | 10 | "by_from_id" | 查询前 10 条请求,按 id 排序 | | [true, "1960-01-01T00:00:00", 99] | 10 | "by_ratification_deadline" | 查询前 10 条请求,按批准截止时间排序 |

另见: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_escrows",
    "params": {
      "start": [
        "",
        0
      ],
      "limit": 10,
      "order": "by_from_id"
    },
    "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_escrows",
    "params": {
      "start": [
        true,
        "1970-01-01T00:00:00",
        0
      ],
      "limit": 10,
      "order": "by_ratification_deadline"
    },
    "id": 1
  }'

Response ​

RESPONSE
json
{
  "escrows": [
    {
      "id": 158,
      "escrow_id": 1,
      "from": "addicttolife",
      "to": "fundition.help",
      "agent": "ongame",
      "ratification_deadline": "2018-11-23T17:31:26",
      "escrow_expiration": "2018-11-24T17:31:26",
      "sbd_balance": {
        "amount": "0",
        "precision": 3,
        "nai": "@@000000013"
      },
      "steem_balance": {
        "amount": "4832",
        "precision": 3,
        "nai": "@@000000021"
      },
      "pending_fee": {
        "amount": "0",
        "precision": 3,
        "nai": "@@000000021"
      },
      "to_approved": true,
      "agent_approved": true,
      "disputed": false
    }
  ]
}