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 at the provider format.

Example: from=bitcoin
network
string

Crypto currency network

Example: network=bitcoin
to
required
string

Fiat currency at the ISO-4217 standard.

Example: to=EUR
payment-method
required
string

Payment method, valid values : visa, mastercard, creditcard, pix, mobikwik, easypay, astropay, upibanktransfer, sofort, bancontact, giropay, maestro, googlepay, applepay, paypal, sepa, ach, fasterpayments, easybank, bank, gbpbank, eps, ideal, other.

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
[
  • {
    },
  • {
    }
]

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": { }
}