Quick Buy
The Quick Buy module provides the infrastructure to perform buy exchanges on behalf of customers, using a customer's external financial card. This module includes a series of endpoints tailored to the needs of users looking to perform and monitor quick buy exchanges for their customers, as well as manage their saved cards.
Offering functions from quoting to execution, along with detailed tracking mechanisms, the Quick Buy module endpoints include:
List Cards - Retrieve a list of payment cards associated with a customer.
Get Card by ID - Enables a user to retrieve information about a payment card by submitting the ID of the payment card.
Delete Card - Allows a user to delete a payment card, removing it from being an option for further exchanges.
Get Available Asset Pairs: Provides a list of asset pairs enabled for the API user and available for quick buy. The response will also include information on limits and minimums associated with each asset pair for exchanges.
Get Quote: Provides an estimate for a quick buy exchange, detailing the price and amount before the actual exchange is executed, ensuring that the customer is informed about the potential transaction.
Submit Exchange: This endpoint will allow a customer to initiate a quick buy exchange. The customer can either use a saved payment card or enter details of a payment card. The user has the option of saving the payment card for use in further exchanges.
List Exchanges: Provides a generated list of quick buy exchanges, with the ability to filter by customer, order type, and more.
Get Order by ID: Provides a details of a quick buy order buy submitting the ID of the exchange.
List Cards
Retrieve a list of payment cards associated with a customer
Endpoint:
/api/v1/customer/quick-buy/cards/list
Method:
GET
Request Query Example
Response Body Example
Get Card by ID
Enables a user to retrieve information about a payment card by submitting the ID of the payment card.
Endpoint:
/api/v1/customer/quick-buy/cards/getbyid
Method:
GET
Request Query Example
Response Body Example
Delete Card
Allows a user to delete a payment card, removing it from being an option for further exchanges.
Endpoint:
/api/v1/customer/quick-buy/cards/delete
Method:
POST
Request Query Example
Response Body Example
Get Available Asset Pairs
Provides a list of asset pairs enabled for the API user and available for quick buy. The response will also include information on limits and minimums associated with each asset pair for exchanges.
Endpoint:
/api/v1/customer/quick-buy/orders/assets
Method:
GE
Request Query Example
Response Body Example
Get Quote
This endpoint provides a quoted market price for a proposed asset exchange for a particular customer, detailing the amount and price for an exchange. By specifying details of the desired trade, a customer can see the cost or proceeds they might expect from completing a transaction, including any applicable fees. This helps customers decide whether to proceed with an exchange based on real-time financial data. For quick buy exchanges, all exchanges will refer to the specified crypto currency being bought in exchange for fiat currency.
Endpoint:
/api/v1/customer/quick-buy/orders/quote
Method: GET
Query Parameters:
customersId
(Integer): ID of the customer making the exchange—required.assetCode
(String): The crypto currency to be bought, such as "BTC"—required.assetAmount
(Decimal, Nullable): Desired amount of crypto currency to be bought. Must be null if currencyAmount is specified.currenyAmount
(Decimal, Nullable): Desired amount of currency to be exchanged. Must be null if assetAmount is specified.
Response Body Parameters:
id
(Integer): Not used.details
(Object): Contains the quote details.customersId
(Integer): ID of the customer.assetCode
(String): Crypto currency asset to be bought in the exchange.currenyCode
(String): Fiat currency asset involved in the exchange.assetAmount
(Decimal): Amount of crypto currency asset to be bought.currencyAmount
(Decimal): Amount of fiat currency required for exchange.
Request Query Example
Response Body Example
Possible Error Codes
Required
Named field missing or zero
Invalid
Value given for named field is invalid
Documents_Not_Verified
Cannot perform this action for this customer due to the KYC state
Amount_Must_Be_Positive
Invalid or missing amount
Submit Exchange
This endpoint is intended for initiating a quick buy exchange, enabling a customer to purchase an asset at a specified price.
Endpoint:
/api/v1/customer/quick-buy/orders/submit
Method:
POST
Request Body Parameters:
customersId
(Integer): ID of the customer making the exchange—required.assetCode
(String): The crypto currency to be bought, such as "BTC"—required.assetAmount
(Decimal, Required): Desired amount of crypto currency to be bought.currenyAmount
(Decimal, Required): Desired amount of currency to be exchanged.paymentCardsId
(Integer, Nullable): Id of saved payment card. Must be null if CardDetails is not null.cardDetails
(JSON Object): Details of payment card. Must be null if paymentCardsId is not null.cardNumber
(String, Required): Card number.cvv
(String, Required): Card CVVcardHolderName
(String, Required): Cardholder name.addressLine1
(String, Required): Cardholder address line 1.addressLine2
(String): Cardholder address line 2.townCity
(String, Required): Cardholder town or city.countryISO2
(String, Required): Cardholder country of address.stateProvince
(String, Required): Cardholder state or province.postCode
(String, Required): Cardholder ZIP/Postal Code.expMonth
(Integer, Required): Card expiration month.expYear
(Integer, Required): Card expiration year.bSaveCard
(Boolean, Required): Indicates whether the payment card should be saved.
Request Example:
Response Body Parameters:
id
(Integer): Not used.details
(Object):status
(String): The status of the transaction, such as "Pending".Possible values:
Pending
,Failed
,Approved
,ActionRequired
.
exchangesId
(Integer): The ID of the associated asset exchange.
Success Response Example:
Possible Error Codes
Required
Named field missing or zero
Invalid
Value given for named field is invalid
Documents_Not_Verified
Cannot perform this action for this customer due to the KYC state
List Exchanges
Provides a system generated list of quick buy exchanges, with ability to filter by the the customersID or asset pair.
Endpoint:
/api/v1/customer/quick-buy/orders/list
Method:
GET
Request Query
Optional Request Query Parameters:
customersId
(Integer): The ID of the customer initiating the purchase.assetPair
(String): The asset pair to be filtered, such as "BTC/USDC".PageNumber
(Integer): List page number (default = 1)PageSize
(Integer): List page size (default = 10)
Request Query Example
Response Body Example
Get Order by Id
Provides a system generated list of quick buy exchanges, with ability to filter by the the customersID or asset pair.
Endpoint:
/api/v1/customer/quick-buy/orders/getbyid
Method:
GET
Request Query
Optional Request Query Parameters:
customersId
(Integer): The ID of the customer initiating the purchase.assetPair
(String): The asset pair to be filtered, such as "BTC/USDC".PageNumber
(Integer): List page number (default = 1)PageSize
(Integer): List page size (default = 10)
Request Query Example
Response Body Example
Last updated