Description of JSON formatted answer

The most convenient format for processing. All data is returned in JSON format with the named parameters.

  • code — is the error code;
  • message — is the text of the error;
  • data — data.

Example

{
    "code": 0,
    "message": "",
    "data": [ ... data ... ]
}    

An example of a successful reply to get_accounts in the JSON format

{
    "code": 0,
    "message": "",
    "data": {
        "summary": {
            "RUR": "21069.99",
            "USD": "99998883588.94",
            "EUR": "2749.05",
            "BTC": "2.00"
        },
        "accounts": [
            {
                "name": "Для рефера",
                "number": "U0100652",
                "currency": "USD",
                "balance": "0.90",
                "blockedAmount": "0.00"
            },
            {
                "name": "Test API account",
                "number": "R0100415",
                "currency": "RUR",
                "balance": "0.00",
                "blockedAmount": "0.00"
            },
            {
                "name": "Абв",
                "number": "R0100671",
                "currency": "RUR",
                "balance": "6607.74",
                "blockedAmount": "0.00"
            },
            {
                "name": "Для мерчанта RUR1",
                "number": "R0100050",
                "currency": "RUR",
                "balance": "115.00",
                "blockedAmount": "0.00"
            },
            {
                "name": "Test",
                "number": "E0100965",
                "currency": "EUR",
                "balance": "2763.05",
                "blockedAmount": "14.00"
            },
            {
                "name": "123",
                "number": "U0100837",
                "currency": "USD",
                "balance": "1000.00",
                "blockedAmount": "0.00"
            },
            {
                "name": "Биржа труда",
                "number": "R0100271",
                "currency": "RUR",
                "balance": "0.00",
                "blockedAmount": "0.00"
            },
            {
                "name": "Биржа USD",
                "number": "U0100692",
                "currency": "USD",
                "balance": "337.92",
                "blockedAmount": "0.00"
            },
            {
                "name": "Для мерчанта EUR",
                "number": "E0100853",
                "currency": "EUR",
                "balance": "0.00",
                "blockedAmount": "0.00"
            },
            {
                "name": "Test5000",
                "number": "R0100400",
                "currency": "RUR",
                "balance": "0.00",
                "blockedAmount": "0.00"
            },
            {
                "name": "Очень большое название и длинное",
                "number": "R0100813",
                "currency": "RUR",
                "balance": "14347.25",
                "blockedAmount": "0.00"
            },
            {
                "name": "Bitcoin 23",
                "number": "B0100245",
                "currency": "BTC",
                "balance": "2.00",
                "blockedAmount": "0.00"
            },
            {
                "name": "Для мерчанта USD",
                "number": "U0100788",
                "currency": "USD",
                "balance": "31.25",
                "blockedAmount": "0.00"
            },
            {
                "name": "$$$",
                "number": "U0100020",
                "currency": "USD",
                "balance": "99998882988.87",
                "blockedAmount": "770.00"
            },
            {
                "name": "Test API account",
                "number": "R0100560",
                "currency": "RUR",
                "balance": "0.00",
                "blockedAmount": "0.00"
            }
        ]
    }
}

See also

  • csv — is the reply in the CSV format. Data are separated by semicolons and line wraps.
  • json-lite — the format of a JSON-LITE reply. CSV data presented in the form of a json string.
API Capitalist