Sell Provider Server (1.0)

Download OpenAPI specification:Download

getCapabilities

Responses
200

OK

default

Error sent by the provider

get/capabilities
Response samples
application/json
{
  • "fiatCurrencyCapabilities": [
    ],
  • "cryptoCurrencyCapabilities": [
    ],
  • "countriesCapabilities": [
    ]
}

getQuote

Request
query Parameters
from
required
string

Crypto currency ID using the LedgerId format.

Example: from=bitcoin
to
required
string

Fiat currency at the ISO-4217 standard.

Example: to=EUR
payment-method
required
string

Payment method, valid values: card, googlepay, applepay, paypal, cryptocom, sepa, ach, instantach, fasterpayments, easybank, bank, cashapp, venmo, pix, mobikwik, easypay, astropay, upibanktransfer, sofort, bancontact, giropay, eps, ideal, other, revolut, p2p, interac, payid, spei, imps, gcash, ovo, shopeepay, grabpay, linkaja, maya, pse, dana, qris

Example: payment-method=paypal
amount
required
string

CryptoCurrency amount to sell.

Example: amount=0.3
Responses
200

OK

400

Invalid value for: query parameter from, Invalid value for:query parameter to, Invalid value for: query parameter paymentMethod...

default

Error sent by the provider

get/quote
Response samples
application/json
{
  • "quoteId": "CC14E626-CF1B-4EDA-AF5E-766FFD5A3457",
  • "amountFrom": "1",
  • "amountTo": "270.864632",
  • "providerFees": "0.0001",
  • "referralFees": "0.0001",
  • "expiry": "2022-04-04T09:10:51+0000"
}

getCrypto-currencies

Responses
200

OK

default

Error sent by the provider

get/crypto-currencies
Response samples
application/json
[
  • "bitcoin",
  • "solana",
  • "ethereum",
  • "ethereum/erc20/aave",
  • "solana/spl/epjfwdd5aufqssqem2qn1xzybapc8g4weggkzwytdt1v"
]

Retrieve a redirect URL

Returns the URL of the off-ramp widget, including the specified Sell parameters, to which the user will be redirected.

SecuritydefaultApiKey
Request
query Parameters
accountId
required
string

User’s selected account id, where the crypto he wants to sell is stored.

Example: accountId=d7e79746-e40c-5fab-9012-3c0bc04e8a13
cryptoCurrency
required
string

The crypto currency that the user wants to sell. It will contain the LedgerID value to identify the crypto.

Example: cryptoCurrency=bitcoin
fiatCurrency
required
string

The FIAT currency that the user wants to be paid with.

Example: fiatCurrency=EUR
cryptoAmount
required
string

The crypto amount that the user wants to sell.

Example: cryptoAmount=0.001
paymentMethod
required
string

The payment method selected by the user.

Example: paymentMethod=card
mode
required
string

In this case always sell.

Example: mode=sell
bankResidency
required
string

User's Country Code (ALPHA-2).

Example: bankResidency=FR
customParameters
string

Used to include additional URL-encoded key-value parameters in the widget URL.

Example: customParameters=widgetid%3D247312%26ledgerlive%3Dtrue
ledgerTransactionId
string

Ledger Live transaction ID. Used by Ledger to track transactions and their completion statuses.

Example: ledgerTransactionId=9649d677-f201-45b2-8130-0317065743de
deeplinkUrl
string

Deeplink URL to Ledger Live.

Example: deeplinkUrl=ledgerlive://buy
Responses
200

OK

400

Bad Request

postSell

Generates a secure binary payload for the nano in order to authorize the transaction.

  • We send on sell endpoint the quoteId (id generated with the previous call to /quote ). The partner should retrieve the quote data (amounts…) from this id.
  • The final source of Truth for the user is the binary payload you generate.
Request
Request Body schema: application/json

Info for generating payload

quoteId
required
string

Previously generated quote ID.

amount
required
string

Amount requested by the user to be sold.

refundAddress
required
string

User's refund address, typically the fromAddress.

fromCryptoCurrency
required
string

From currency ID, using the provider's identifiers.

toFiatCurrency
required
string

Fiat currency at the ISO-4217 standard.

payloadCryptoCurrency
required
string

From currency ID, using Ledger's referential. (representing currency_from in the protobuf payload

nonce
required
string

Value for the device_transaction_id_ng field in the protobuf payload, in hex format of the byte array nonce received by the user.

slippage
string

Value between 0 to 1 (0.1 => 10%). Maximum difference between the quoted amount and the final amount received, as a ratio. If exceeded, user consent is required or a refund is made.

Responses
200

OK

400

Deposit wallet not available.

404

Not found error.

451

When the user's IP address is in a restricted region.

post/sell
Request samples
application/json
{
  • "quoteId": "string",
  • "amount": "string",
  • "refundAddress": "string",
  • "fromCryptoCurrency": "string",
  • "toFiatCurrency": "string",
  • "payloadCryptoCurrency": "string",
  • "nonce": "string",
  • "slippage": "string"
}
Response samples
application/json
{
  • "sellId": "SELL-ID-165940",
  • "amount": "1.337",
  • "payinAddress": "0xa0b86991c627e936c1d19d4a2e90a2ce3606eb48",
  • "createdAt": "2030-05-26T14:13:39",
  • "providerFees": "0.0001",
  • "referralFees": "0.0001",
  • "providerSig": {
    }
}

statusUpdate

Updates the status of a sell transaction.

SecuritydefaultApiKey
Request
path Parameters
sellId
required
string
Example: 1234
Request Body schema: application/json

Status update payload

status
required
string
Enum: "FINISHED" "EXPIRED" "ON_HOLD" "PENDING" "TRANSFER_IN_COMPLETED" "REFUNDED" "UNKNOWN"
amount
string

as soon as this information is known, this should contain the final amount transferred to the user in output currency.

payinTransactionId
string

as soon as this information is known, this should contain the payin transaction hash.

providerFees
string

Fees paid to the provider.

referralFees
string

Fees paid to Ledger, as a referral fee.

Responses
200

OK

404

Sell transaction not found.

post/transaction/{sellId}/status
Request samples
application/json
{
  • "status": "FINISHED",
  • "amount": "string",
  • "payinTransactionId": "string",
  • "providerFees": "string",
  • "referralFees": "string"
}
Response samples
application/json
{
  • "messageKey": "SELL_TRANSACTION_NOT_FOUND_ERROR",
  • "message": "Sell transaction not found. (you can add any useful field as you want)"
}

getStatusUpdate

Get status of a sell transaction.

SecuritydefaultApiKey
Request
path Parameters
sellId
required
string
Example: 1234
Responses
200

Status of transaction returned

404

Sell transaction not found.

get/transaction/{sellId}/status
Response samples
application/json
{
  • "messageKey": "string",
  • "message": "string",
  • "additionalFields": { }
}