Aller au contenu

database_api.list_escrows ​

since HF14

Purpose ​

Retourne une liste de séquestres (escrow). Paramètres : start:array ; limit:int ; order:string

  • start dépend de order (voir ci-dessous)
  • limit est limité à 1000.
  • order peut être l'un des suivants :
    • by_from_id - tri par id
      • start est un tableau de deux valeurs : account, escrow_id
    • by_ratification_deadline - tri par date limite de ratification (ratification deadline)
      • start est un tableau de trois valeurs : is_approved, timestamp, escrow_id

| start (array) | limit (int) | order (string) | | |----------------------------|---------------|-| | ["alice", 99] | 10 | "by_from_id" | Interroge les 10 premières demandes, tri par id | | [true, "1960-01-01T00:00:00", 99] | 10 | "by_ratification_deadline" | Interroge les 10 premières demandes, tri par date limite de ratification |

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_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
    }
  ]
}