Skip to content

Latest commit

 

History

History
96 lines (71 loc) · 2.77 KB

rest.md

File metadata and controls

96 lines (71 loc) · 2.77 KB

Ripple Gateway REST API

A simplified RESTful API for running a the Ripple Network.

Bugs

This API is still in beta. Please open issues for any problems you encounter.

Available Resources

  1. Users
  2. External Accounts
  3. Deposits
  4. Withdrawals
  5. Balances
  6. Ripple Addresses
  7. Ripple Transactions
  8. Gateway Settings

1. Notifications


GET /api/v1/addresses/:address/next_notification

Get the most recent notification for a particular account. See next route details for response format.


GET /api/v1/addresses/:address/next_notification/:prev_tx_hash

Get the next notification after the given :prev_tx_hash for a particular accounts.

Response:

{
    "success": true,
    "notification": {
        "address": "rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz",
        "type": "payment",
        "tx_direction": "outgoing",
        "tx_state": "confirmed",
        "tx_result": "tesSUCCESS",
        "tx_ledger": 4696959,
        "tx_hash": "55BA3440B1AAFFB64E51F497EFDF2022C90EDB171BBD979F04685904E38A89B7",
        "tx_timestamp": 1391025100000,
        "tx_url": "http://ripple-simple.herokuapp.com/api/v1/addresses/rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz/payments/55BA3440B1AAFFB64E51F497EFDF2022C90EDB171BBD979F04685904E38A89B7",
        "confirmation_token": "55BA3440B1AAFFB64E51F497EFDF2022C90EDB171BBD979F04685904E38A89B7"
    }
}

Or if there are no new notifications:

(Note the "type": "none" and "tx_state": "empty" or "tx_state": "pending")

{
    "success": true,
    "notification": {
        "address": "rKXCummUHnenhYudNb9UoJ4mGBR75vFcgz",
        "type": "none",
        "tx_direction": "",
        "tx_state": "empty", // or "pending" if still waiting for outgoing transactions to clear
        "tx_result": "",
        "tx_ledger": "",
        "tx_hash": "",
        "tx_timestamp": ,
        "tx_url": "",
        "confirmation_token": ""
    }
}

2. Payments