APIs

The ultimate guide to integrate DePay PRO APIs.

APIs to access blockchain data like payment tracking, tokens, decentralized exchange information, prices etc.


Introduction

DePay provides APIs via https://api.depay.pro and the latest API version is /v1.


Authentication

In order to authenticate towards our APIs, you need to issue an API key dedicated to your integration.

For testing purposes, DePay provides a public API key which is not recommended for any live integration as it's shared with the public and heavily rate-limited. We also rotate the public api key on a recurring basis.

Testing API key

M5dZeHFfIp3J7h9H9fs4i4wmkUo1HjAF3EmMy32c ONLY USE THIS KEY FOR TESTING PURPOSES. DO NOT USE THIS KEY FOR ANY INTEGRATION OR APPLICATION.


Payments

POST v1/payments

The payments endpoint allows you to create a payment tracker that will call your backend once the payment has been confirmed by the network.

Required parameters

blockchain e.g. ethereum

expected_amount human readable e.g. 10

expected_token_id the address of the token e.g. 0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb

to the wallet address that you expect to receive the payment e.g. 0x4e260bB2b25EC6F3A59B478fCDe5eD5B8D783B02

from the wallet address you expect to sent the payment e.g. 0xb0252f13850a4823706607524de0b146820F2240

nonce the nonce of the wallet at the time the payment transaction was sent e.g. 211

transaction_id the id/hash of the transaction to track e.g. 0xbf2904a219a67b3dae5b1292c864a5bbac38123d483b0a40fb9e209d89037c31

callback the endpoint to call with a POST request once the payment has been confirmed successfully e.g. https://my.app/payments/79cb1c8b-b571-4738-b275-b5019ecf086c/confirm

Example Request

{
  "blockchain": "ethereum",
  "expected_amount": "10.0",
  "expected_token_id": "0xa0bed124a09ac2bd941b10349d8d224fe3c955eb",
  "to": "0x65abbded9b937e38480a50eca85a8e4d2c8350e4",
  "from": "0x5b71c0859f7698bc28a0eca784066cb6d9d2a7ed",
  "nonce": 301,
  "transaction_id": "0xbf2904a219a67b3dae5b1292c864a5bbac38123d483b0a40fb9e209d89037c31",
  "callback": "https://my.app/payments/79cb1c8b-b571-4738-b275-b5019ecf086c/confirm"
}

Example Response

{
  "id": "79cb1c8b-b571-4738-b275-b5019ecf086c",
  "transaction_id": "0xbf2904a219a67b3dae5b1292c864a5bbac38123d483b0a40fb9e209d89037c31",
  "created_at": "2021-06-28T14:49:26.086Z",
  "updated_at": "2021-06-28T14:51:44.320Z",
  "expected_amount": "10.0",
  "expected_token_id": "0xa0bed124a09ac2bd941b10349d8d224fe3c955eb",
  "blockchain": "ethereum",
  "from": "0x5b71c0859f7698bc28a0eca784066cb6d9d2a7ed",
  "to": "0x65abbded9b937e38480a50eca85a8e4d2c8350e4",
  "nonce": 301,
  "status": "pending",
  "callback": "https://my.app/payments/79cb1c8b-b571-4738-b275-b5019ecf086c/confirm",
  "confirmed_at": null
}

Example Callback Body

{
  "id": "79cb1c8b-b571-4738-b275-b5019ecf086c",
  "transaction_id": "0xbf2904a219a67b3dae5b1292c864a5bbac38123d483b0a40fb9e209d89037c31",
  "created_at": "2021-06-28T14:49:26.086Z",
  "updated_at": "2021-06-28T14:51:44.320Z",
  "expected_amount": "10.0",
  "expected_token_id": "0xa0bed124a09ac2bd941b10349d8d224fe3c955eb",
  "blockchain": "ethereum",
  "from": "0x5b71c0859f7698bc28a0eca784066cb6d9d2a7ed",
  "to": "0x65abbded9b937e38480a50eca85a8e4d2c8350e4",
  "nonce": 301,
  "status": "success",
  "callback": "https://my.app/payments/79cb1c8b-b571-4738-b275-b5019ecf086c/confirm",
  "confirmed_at": "2021-06-28T14:50:50.000Z"
}


Tokens

GET v1/tokens/<blockchain>/<address>

The token endpoint allows you to retrieve token information by given blockchain and address.

Required parameters

blockchain e.g. ethereum

address the address of the token e.g. 0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb

Example Request

curl --request GET 'https://api.depay.pro/v1/tokens/ethereum/0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb' \
     --header 'x-api-key: M5dZeHFfIp3J7h9H9fs4i4wmkUo1HjAF3EmMy32c'

Example Response

{
  "id":"1e3036a6-b099-4866-adc5-bf94509d4434",
  "blockchain":"ethereum",
  "external_id":"0xa0bed124a09ac2bd941b10349d8d224fe3c955eb",
  "symbol":"DEPAY",
  "name":"DePay",
  "cryptorank_id":"25373",
  "reserve_usd":1469504,
  "volume_usd":9425459,
  "image":"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/assets/0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb/logo.png",
  "launched_at":null,
  "project_name":null,
  "website":"http://depay.fi",
  "telegram":"DePayNews",
  "twitter":"DePayFi",
  "github":"https://github.com/DePayFi",
  "description":"DePay enables people to easily accept and perform crypto payments. A decentralized payment protocol built on decentralized finance.",
  "chat":"https://discord.com/invite/smDs5zK",
  "reddit":"https://www.reddit.com/r/DePayFi/",
  "announcements":"https://medium.com/@DePay, https://www.linkedin.com/company/68837582",
  "routable":true,
  "created_at":"2021-04-23T15:10:17.908Z",
  "updated_at":"2021-05-19T12:28:29.704Z",
  "rank":1730,
  "market_cap_rank":1971,
  "score":16.745,
  "sentiment_votes_up_percentage":0.0,
  "sentiment_votes_down_percentage":100.0,
  "community_score":17.202,
  "liquidity_score":15.757,
  "public_interest_score":0.0,
  "telegram_channel_user_count":975,
  "twitter_followers":2257,
  "token_holders":1272,
  "total_transfers":10537,
  "latest_transfer":"2021-05-19T01:42:53.000Z",
  "first_transfer":"2020-09-14T20:21:19.000Z",
  "unique_senders":2414,
  "unique_receivers":3509,
  "decimals":null,
  "checksum_address":"0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb"
}


Price

GET v1/price

The token price api endpoint allows you to fetch a token price for a given token address or a token symbol.

The historic price data density is 1 minute.

Required parameters

blockchain and token or symbol

Optional parameters

at

All parameters

blockchain

The blockchain for which to fetch the information for: e.g. ethereum,bsc

token

The token address for which to fetch the information for: e.g. 0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb

symbol

The token symbol for which to fetch the information for: e.g. DEPAY

We recommend to use blockchain and token to identify tokens unambiguously.

at

Date and time in ISO 8601 format e.g. 2021-05-26T10:00:00,2021-05-26T10:00:00Z+02:00

If not provided, it will fetch the current price.

Example Requests

curl --request GET 'https://api.depay.pro/v1/price?blockchain=ethereum&token=0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb&at=2021-02-21T14:00:00' \
     --header 'x-api-key: M5dZeHFfIp3J7h9H9fs4i4wmkUo1HjAF3EmMy32c'

curl --request GET 'https://api.depay.pro/v1/price?symbol=ETH' \
     --header 'x-api-key: M5dZeHFfIp3J7h9H9fs4i4wmkUo1HjAF3EmMy32c'

Example Response

{
    "usd": "5.917791764768563"
}


FIAT

GET v1/fiat

The fiat currency API allows you to retrieve current currency prices in USD.

There is no historic data and the data is updated every 12 hours.

Required parameters

symbol

Supported currencies

ALL XCD EUR BBD BTN BND XAF CUP USD FKP GIP HUF IRR JMD AUD LAK LYD MKD XOF NZD OMR PGK RWF WST RSD SEK TZS AMD BSD BAM CVE CNY CRC CZK ERN GEL HTG INR JOD KRW LBP MWK MRO MZN ANG PEN QAR STD SLL SOS SDG SYP AOA AWG BHD BZD BWP BIF KYD COP DKK GTQ HNL IDR ILS KZT KWD LSL MYR MUR MNT MMK NGN PAB PHP RON SAR SGD ZAR SRD TWD TOP VEF DZD ARS AZN BYR BOB BGN CAD CLP CDF DOP FJD GMD GYD ISK IQD JPY KPW LVL CHF MGA MDL MAD NPR NIO PKR PYG SHP SCR SBD LKR THB TRY AED VUV YER AFN BDT BRL KHR KMF HRK DJF EGP ETB XPF GHS GNF HKD XDR KES KGS LRD MOP MVR MXN NAD NOK PLN RUB SZL TJS TTD UGX UYU VND TND UAH UZS TMT GBP ZMW BTC BYN BMD GGP CLF CUC IMP JEP SVC ZMK XAG ZWL

Example Requests

curl --request GET 'https://api.depay.pro/v1/fiat?symbol=EUR' \
     --header 'x-api-key: M5dZeHFfIp3J7h9H9fs4i4wmkUo1HjAF3EmMy32c'

Example Response

{
  "usd": "5.917791764768563"
}


Assets

GET v1/assets

Provides you all assets stored in the given account on the given blockchain.

Required parameters

blockchain e.g. ethereum

account e.g. 0xb0252f13850a4823706607524de0b146820F2240

Example Request

curl --request GET 'https://api.depay.pro/v1/assets?blockchain=ethereum&account=0xb0252f13850a4823706607524de0b146820F2240' \
     --header 'x-api-key: M5dZeHFfIp3J7h9H9fs4i4wmkUo1HjAF3EmMy32c'

Example Response

[
  {
    "name"=>"Dai Stablecoin",
    "symbol"=>"DAI",
    "address"=>"0x6B175474E89094C44Da98b954EedeAC495271d0F",
    "type"=>"ERC20",
    "balance"=>"38007804249707967889272"},
  {
    "name"=>"DePay",
    "symbol"=>"DEPAY",
    "address"=>"0xa0bEd124a09ac2Bd941b10349d8d224fe3c955eb",
    "type"=>"ERC20",
    "balance"=>"212816860003097638129"
  }
]

Support

Need additional help
?

Feel free to reach out in order to get additional help:

Ask the community
Open an issue
Start a conversation