Backend

You need to follow some steps so your LiveApp can communicate properly with our Backend.

In addition to the following steps, Ledger also needs to know:

  • The base url of the API,
  • Any backend authentication information to use the api (token in header…)

Endpoints needed for Buy

In order to communicate with Ledger’s backend, you must provide standardised APIs for Ledger’s BUY aggregator services to call.

đź”—

You will find all the information regarding the BUY endpoints here: https://exchange-integration-buy.redoc.ly/.

There are 3 main endpoints needed for the buy:

  • To get the list of available fiat, country, payment, method and amount: /capabilities.
  • To get the list of available crypto-currencies: /crypto-currencies.
  • To get the crypto amount that the user should expect -after all fees are deducted - as a payment for the given fiat amount: /quotes.

Ledger IDs mapping

To comply with our integration policies, the LedgerId format must be used (by your /crypto-currencies endpoint) and accepted (by your /quote endpoint and widgetURL) to accurately identify tokens and coins.

You can refer to this API to obtain ledger IDs. You can use the search parameter to find a specific coin or token. For instance, to search for USDT, you can use this request. The API returns paginated results: to access the next pages, include cursor=<value of the "X-Ledger-Next" header> in your request. Further information is available in the response headers.

Example: let’s say your support AAVE on Ethereum mainnet. The LedgerID for AAVE on Ethereum is ethereum/erc20/aave (as we can see here). This means:

  • Your /crypto-currencies endpoint must include ethereum/erc20/aave in its response (along with the other coins/tokens you support), so we know that you support AAVE on Ethereum.
  • Your /quote endpoint must accept ethereum/erc20/aave as a value for the to parameter.
  • Your widgetURL must accept ethereum/erc20/aave as a value for the to parameter.
Ledger
Copyright © Ledger SAS. All rights reserved. Ledger, Ledger Stax, Ledger Nano S, Ledger Vault, Bolos are trademarks owned by Ledger SAS