Quote Spark exit
Requires scope quotes:read.
ApiKeyAuthorizationBearer <sk_test_ or sk_live_ key>Your sk_live_ / sk_test_ API key
x-customer-id?stringIdentifies whose spark wallet to price against.
application/json- body
operation*stringWhat to price. quoteWithdraw prices a cooperative exit from Spark to a Bitcoin L1 address and needs withdrawalAddress + amountSats. quoteLightningPayment prices paying a Lightning invoice and needs encodedInvoice.
"quoteWithdraw""quoteLightningPayment"treasury?booleanSet true to price against the customer's treasury spark wallet rather than their ordinary one.
withdrawalAddress?stringquoteWithdraw only, and required for it: the Bitcoin L1 address the exit pays out to.
amountSats?integerquoteWithdraw only, and required for it: the amount to withdraw, as an integer count of satoshis.
0 < valueencodedInvoice?stringquoteLightningPayment only, and required for it: the BOLT-11 invoice to pay.
btcUsdRate?numberOptional BTC/USD rate.
0 <= valueResponse Body
200application/json
Spark exit fee quote
TypeScript Definitions
Use the response body type in TypeScript.
400application/json
Malformed body — an operation outside the two priced ones, a field the chosen operation requires but did not get, a withdrawalAddress that is not a valid Bitcoin address on the configured network, or a non-positive amountSats.
TypeScript Definitions
Use the response body type in TypeScript.
401application/json
The Authorization header is missing, malformed, or the API key is unknown or revoked
TypeScript Definitions
Use the response body type in TypeScript.
403application/json
The API key lacks the quotes:read scope
TypeScript Definitions
Use the response body type in TypeScript.
404application/json
No spark wallet exists for this owner.
TypeScript Definitions
Use the response body type in TypeScript.
429application/json
This business exceeded its per-minute enclave quote budget.
TypeScript Definitions
Use the response body type in TypeScript.
500application/json
A fault on our side.
TypeScript Definitions
Use the response body type in TypeScript.
502application/json
The enclave could not be reached, returned no fee, or the Spark service provider refused to price the exit.
TypeScript Definitions
Use the response body type in TypeScript.
504application/json
The quote did not finish within the gateway's quote budget.
TypeScript Definitions
Use the response body type in TypeScript.
Language
curl -X POST 'https://api.pilot.shiga.io/v1/quotes/spark' \ -H 'x-customer-id: <customer id>' \ -H 'Authorization: Bearer sk_test_...' \ -H 'Content-Type: application/json' \ -d '{ "operation": "quoteWithdraw"}'{ "data": { "chain": "spark", "moduleId": "spark", "operation": "quoteWithdraw", "fee": "0.784000", "feeSats": 1206, "sparkData": {} }, "status": 200, "success": true}