Quotes
Lock the price of one trade before the customer pays, then create the order from it.
A quote is a locked price for one trade. It tells the customer exactly what they send and exactly what they receive. Every order that you create starts from a quote. Collection deposits do not use quotes. Pulse prices each deposit when it arrives.
A quote covers one of two trades:
- Onramp: the customer pays naira and receives crypto.
- Offramp: the customer sends crypto and receives naira.
How quotes work
- You ask for a quote with the trade direction, the network, and one amount.
- Pulse returns the rate and both amounts. Show these figures to the customer.
- The customer accepts, and you create the order from the quote within two minutes.
- If the customer needs more time, refresh the quote to get current pricing.
To show prices before a customer starts a trade, use indicative rates. They do not lock a price.
Set the direction
Set source_currency to the currency that the customer sends. Set
destination_currency to the currency that the customer receives. Exactly one
currency must be NGN.
| Currency pair | Flow |
|---|---|
| NGN to crypto | Onramp |
| Crypto to NGN | Offramp |
The request returns invalid_currency when both currencies are NGN or neither
currency is NGN.
Choose a network
Set network to the chain for the crypto transfer. Pulse does not infer it. See
Supported networks for the assets on each network.
Send on the quoted network
Funds sent on another network cannot be recovered.
Choose which amount to fix
The customer usually has one figure in mind: what they want to spend, or what they want to receive. Send that figure as the one amount, and Pulse computes the other.
| You send | Meaning | Pulse computes |
|---|---|---|
source_amount | What the customer sends. | destination_amount |
destination_amount | What the customer receives. | source_amount |
Sending both amounts, or neither, returns amount_required.
For example, a customer who wants exactly ₦140,000 from an offramp sends
destination_amount: "140000". Pulse returns the crypto to send in the same call, at
the rate that executes.
The quote is the commitment
Whatever the quote returns is the figure to show the customer. Their input is a
request. If a customer asks for ₦140,000 and the quote returns 102.432779, that is
the amount to send.
Pulse rounds each computed amount to the precision its currency supports, so every
figure it returns can be sent as-is. A computed source_amount rounds up, so it
always covers the requested destination_amount. A computed destination_amount
rounds down, so it never exceeds what the source_amount buys.
Amount limits
Limits apply to the naira side of the trade, whichever amount you send.
- Onramp: ₦15,000 to ₦100,000,000.
- Offramp: at least 10 USDC or USDT. The quoted NGN amount cannot exceed ₦100,000,000.
Send amounts as decimal strings. A value outside these limits returns
invalid_amount. To price a larger trade, use
indicative rates.
Pricing and fees
The rate in a quote already includes Pulse's pricing, and Pulse deducts no separate fee from the quoted amounts. See Pricing for what the rate includes. To earn on each trade, add a partner fee.
The order can settle at different figures from the quote. Late funding can use current pricing, and an offramp pays out on the crypto that Pulse receives. The order reports the effective rate and amounts. See Funding window.
Create a quote
This onramp fixes the naira the customer spends.
curl https://engine-api.pilot.pulseshiga.io/v1/quotes \
-H "X-API-Key: <your key>" \
-H "Content-Type: application/json" \
-d '{
"source_currency": "NGN",
"destination_currency": "USDT",
"network": "POLYGON",
"source_amount": "150000"
}'This offramp fixes the naira the customer receives. Pulse returns the crypto to send.
curl https://engine-api.pilot.pulseshiga.io/v1/quotes \
-H "X-API-Key: <your key>" \
-H "Content-Type: application/json" \
-d '{
"source_currency": "USDT",
"destination_currency": "NGN",
"network": "POLYGON",
"destination_amount": "140000"
}'| Field | Description |
|---|---|
id | The quote ID. Store it to create the order. |
rate | The naira value of one unit of crypto. See Read a rate. |
source_amount | What the customer sends. |
destination_amount | What the customer receives. |
partner_fee | Present when you set a partner fee. |
expires_at | The quote expires at this time. |
Refresh a quote
You can refresh a quote when the customer needs more time:
curl -X POST https://engine-api.pilot.pulseshiga.io/v1/quotes/0198e2c1-…/refresh \
-H "X-API-Key: <your key>"The endpoint keeps the quote ID and the amount you fixed, then uses current pricing to
reset the rate, the computed amount, and expires_at. A quote created with
source_amount returns a new destination_amount. A quote created with
destination_amount returns a new source_amount.
You can refresh an active or expired quote. Pulse returns quote_not_refreshable for
a consumed quote.
Use the quote
Create the order before expires_at, with the order endpoint that matches the flow.
When you create an order from a quote, know that:
- An expired quote, or a quote that already created an order, returns
quote_expired. - If a refresh changes the quote during order creation, Pulse returns
409 quote_changed. Refresh the quote again, show the customer the new figures, then retry the order request. - A quote used with the wrong order endpoint returns
quote_flow_mismatch.
Errors
| Code | Cause |
|---|---|
amount_required | The request sends both amounts, or neither. |
invalid_amount | The amount is outside the amount limits. |
invalid_currency | Both currencies are NGN, or neither is. |
invalid_asset | The crypto is not a supported asset. |
invalid_network | The network is not a supported network. |
quote_not_refreshable | The quote already created an order. |
quote_expired | The quote expired, or it already created an order. |
quote_changed | A refresh changed the quote during order creation. |
quote_flow_mismatch | The quote is for the other flow. |
For partner fee errors, see Partner fees.
Next steps
- Create an onramp order or an offramp order.
- See the Create a quote reference for all fields.