diff --git a/frontend/src/app/docs/api-docs/api-docs-data.ts b/frontend/src/app/docs/api-docs/api-docs-data.ts index 86a63e513..b28f45195 100644 --- a/frontend/src/app/docs/api-docs/api-docs-data.ts +++ b/frontend/src/app/docs/api-docs/api-docs-data.ts @@ -9871,7 +9871,403 @@ export const restApiDocsData = [ codeSampleBisq: emptyCodeSample, } } + }, + { + type: "category", + category: "accelerator", + fragment: "accelerator", + title: "Accelerator", + showConditions: [""], + options: { officialOnly: true }, + }, + { + options: { officialOnly: true }, + type: "endpoint", + category: "accelerator", + httpRequestMethod: "GET", + fragment: "accelerator-deposit-history", + title: "GET Deposit History", + description: { + default: "
Returns a list of deposits the user has made as prepayment for the accelerator service.
" + }, + urlString: "/v1/services/accelerator/deposit-history", + showConditions: [""], + showJsExamples: showJsExamplesDefaultFalse, + codeExample: { + default: { + codeTemplate: { + curl: `/api/v1/services/accelerator/deposit-history`, + commonJS: ``, + esModule: `` + }, + codeSampleMainnet: { + esModule: [], + commonJS: [], + curl: [], + headers: "api_key: stacksats", + response: `[ + { + "type": "Bitcoin", + "invoiceId": "CCunucVyNw7jUiUz64mmHz", + "amount": 10311031, + "status": "pending", + "date": 1706372653000, + "link": "/payment/bitcoin/CCunucVyNw7jUiUz64mmHz" + }, + { + "type": "Bitcoin", + "invoiceId": "SG1U27R9PdWi3gH3jB9tm9", + "amount": 21000000, + "status": "paid", + "date": 1706372582000, + "link": null + }, + ... +]`, + }, + } + } + }, + { + options: { officialOnly: true }, + type: "endpoint", + category: "accelerator", + httpRequestMethod: "GET", + fragment: "accelerator-balance", + title: "GET Available Balance", + description: { + default: "Returns the user's currently available balance, currently locked funds, and total fees paid so far.
" + }, + urlString: "/v1/services/accelerator/balance", + showConditions: [""], + showJsExamples: showJsExamplesDefaultFalse, + codeExample: { + default: { + codeTemplate: { + curl: `/api/v1/services/accelerator/balance`, + commonJS: ``, + esModule: `` + }, + codeSampleMainnet: { + esModule: [], + commonJS: [], + curl: [], + headers: "api_key: stacksats", + response: `{ + "balance": 99900000, + "hold": 101829, + "feesPaid": 133721 +}`, + }, + } + } + }, + { + options: { officialOnly: true }, + type: "endpoint", + category: "accelerator", + httpRequestMethod: "POST", + fragment: "accelerator-estimate", + title: "POST Calculate Estimated Costs", + description: { + default: "Returns estimated costs to accelerate a transaction.
" + }, + urlString: "/v1/services/accelerator/estimate", + showConditions: [""], + showJsExamples: showJsExamplesDefaultFalse, + codeExample: { + default: { + codeTemplate: { + curl: `%{1}" "[[hostname]][[baseNetworkUrl]]/api/v1/services/accelerator/estimate`, //custom interpolation technique handled in replaceCurlPlaceholder() + commonJS: ``, + esModule: `` + }, + codeSampleMainnet: { + esModule: [], + commonJS: [], + curl: ["txInput=ee13ebb99632377c15c94980357f674d285ac413452050031ea6dcd3e9b2dc29"], + headers: "api_key: stacksats", + response: `{ + "txSummary": { + "txid": "ee13ebb99632377c15c94980357f674d285ac413452050031ea6dcd3e9b2dc29", + "effectiveVsize": 154, + "effectiveFee": 154, + "ancestorCount": 1 + }, + "cost": 3850, + "targetFeeRate": 26, + "nextBlockFee": 4004, + "userBalance": 99900000, + "mempoolBaseFee": 40000, + "vsizeFee": 50000, + "hasAccess": true +}`, + }, + } + } + }, + { + options: { officialOnly: true }, + type: "endpoint", + category: "accelerator", + httpRequestMethod: "POST", + fragment: "accelerator-accelerate", + title: "POST Accelerate A Transaction", + description: { + default: "Sends a request to accelerate a transaction.
" + }, + urlString: "/v1/services/accelerator/accelerate", + showConditions: [""], + showJsExamples: showJsExamplesDefaultFalse, + codeExample: { + default: { + codeTemplate: { + curl: `%{1}" "[[hostname]][[baseNetworkUrl]]/api/v1/services/accelerator/accelerate`, //custom interpolation technique handled in replaceCurlPlaceholder() + commonJS: ``, + esModule: `` + }, + codeSampleMainnet: { + esModule: [], + commonJS: [], + curl: ["txInput=ee13ebb99632377c15c94980357f674d285ac413452050031ea6dcd3e9b2dc29&userBid=21000000"], + headers: "api_key: stacksats", + response: `HTTP/1.1 200 OK`, + }, + } + } + }, + { + options: { officialOnly: true }, + type: "endpoint", + category: "accelerator", + httpRequestMethod: "GET", + fragment: "accelerator-history", + title: "GET Private Acceleration History", + description: { + default: "Returns the user's past acceleration requests.
Pass one of the following for :status
: all
, requested
, accelerating
, mined
, completed
, failed
. Pass true
in :details
to get a detailed history
of the acceleration request.
Returns all transactions currently being accelerated.
" + }, + urlString: "/v1/services/accelerator/accelerations", + showConditions: [""], + showJsExamples: showJsExamplesDefaultFalse, + codeExample: { + default: { + codeTemplate: { + curl: `/api/v1/services/accelerator/accelerations`, + commonJS: ``, + esModule: `` + }, + codeSampleMainnet: { + esModule: [], + commonJS: [], + curl: [], + headers: '', + response: `[ + { + "txid": "8a183c8ae929a2afb857e7f2acd440aaefdf2797f8f7eab1c5f95ff8602abc81", + "added": 1707558316, + "feeDelta": 3500, + "effectiveVsize": 111, + "effectiveFee": 1671, + "pools": [ + 111 + ] + }, + { + "txid": "6097f295e21bdd8d725bd8d9ad4dd72b05bd795dc648bfef52150a9b2b7f7a45", + "added": 1707560464, + "feeDelta": 60000, + "effectiveVsize": 812, + "effectiveFee": 7790, + "pools": [ + 111 + ] + } +]`, + }, + } + } + }, + { + options: { officialOnly: true }, + type: "endpoint", + category: "accelerator", + httpRequestMethod: "GET", + fragment: "accelerator-public-history", + title: "GET Public Acceleration History", + description: { + default: `Returns all past accelerated transactions. + Filters can be applied:
status
: all
, requested
, accelerating
, mined
, completed
, failed
timeframe
: 24h
, 3d
, 1w
, 1m
, 3m
, 6m
, 1y
, 2y
, 3y
, all
poolUniqueId
: any id from https://github.com/mempool/mining-pools/blob/master/pools-v2.json
+ blockHash
: a block hash
+ blockHeight
: a block height
+ page
: the requested page number if using pagination
+ pageLength
: the page lenght if using pagination
+ -1 )">{{ item.title }}
+-1 ) && ( !item.hasOwnProperty('options') || ( item.hasOwnProperty('options') && item.options.hasOwnProperty('officialOnly') && item.options.officialOnly && officialMempoolInstance ))">{{ item.title }}
-1 ) && ( !item.hasOwnProperty('options') || ( item.hasOwnProperty('options') && item.options.hasOwnProperty('officialOnly') && item.options.officialOnly && officialMempoolInstance ) || ( item.hasOwnProperty('options') && item.options.hasOwnProperty('auditOnly') && item.options.auditOnly && auditEnabled ) )" [routerLink]="['./']" fragment="{{ item.fragment }}" (click)="navLinkClick($event)">{{ item.title }}Note that we enforce rate limits. If you exceed these limits, you will get an HTTP 429 error. If you repeatedly exceed the limits, you may be banned from accessing the service altogether. Consider an enterprise sponsorship if you need higher API limits.
{{ item.httpRequestMethod }} {{ baseNetworkUrl }}/api{{ item.urlString }}
+{{ item.httpRequestMethod }} {{ baseNetworkUrl }}/api{{ item.urlString }}
+{{ item.httpRequestMethod }} {{ baseNetworkUrl }}/api{{ item.urlString }}
+{{ item.httpRequestMethod }} {{ baseNetworkUrl }}/api{{ item.urlString }}
-