This endpoint generates a real-time quote for converting one wallet currency to another. The response includes the source amount, destination amount, exchange rate, and quote expiry time.
You can use this API to:
See the exact amount you will receive before converting.
Lock a temporary quote for a supported currency pair.
Get the quote_id required to create the final conversion.
Request Parameters
Request Headers
Name
Type
Required
Description
Authorization
string
Yes
Bearer token in the form Bearer sec_..., using your secret key.
Content-Type
string
Yes
Must be application/json.
Body Parameters
Name
Type
Required
Default
Allowed Values
Description
from_currency
string
Yes
-
NGN, USDT, BTC, ETH, LTC, QDX, USDC
Currency slug of the wallet to debit.
to_currency
string
Yes
-
NGN, USDT, BTC, ETH, LTC, QDX, USDC
Currency slug of the wallet to credit. Must be different from from_currency.
Ensure from_currency, to_currency, and amount are present. amount must be greater than 0.
400
INVALID_REQUEST
Ensure both currencies are supported and that from_currency and to_currency are different.
401
No key provided
Send your secret key in the Authorization header.
403
Invalid Key
Ensure you are using a valid secret key beginning with sec_.
500
CONVERSION_FAILED
An unexpected error occurred while generating the quote. Retry the request or contact Basqet support.
2. Execute Conversion API
API Details
Field
Value
Action
Create Wallet Conversion
Method
POST
Path
/v1/wallets/conversions
Auth Requirement
Secret key
Business Summary
This endpoint executes a wallet conversion using a valid quote. Basqet debits your source wallet, credits your destination wallet, records the conversion, and returns the conversion details.
You can use this API to:
Convert funds from one supported wallet currency to another.
Record your own reference for reconciliation.
Make the converted funds immediately available in your destination wallet when the conversion succeeds.
Request Parameters
Request Headers
Name
Type
Required
Description
Authorization
string
Yes
Bearer token in the form Bearer sec_..., using your secret key.
Content-Type
string
Yes
Must be application/json.
Idempotency-Key
string
No
Recommended for safe retries. Reusing the same key returns the cached result for your account and environment.
Body Parameters
Name
Type
Required
Default
Allowed Values
Description
quote_id
string
Yes
-
Prefixed with cq_
Quote identifier returned by the Create Conversion Quote API.
reference
string
No
null
Maximum 255 characters
Optional reference from your system. Must be unique for your account when provided.
When a conversion succeeds and wallet balances are updated, Basqet may send wallet.updated webhooks to your configured webhook URL. A conversion normally produces one wallet update for the debited wallet and one wallet update for the credited wallet.