Merge pull request #4791 from mempool/natsoni/update-doc-historical-price

Update doc for historical price endpoint
This commit is contained in:
softsimon 2024-03-19 11:53:01 +09:00 committed by GitHub
commit e53254fb2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -262,9 +262,9 @@ export const restApiDocsData = [
fragment: "get-historical-price", fragment: "get-historical-price",
title: "GET Historical Price", title: "GET Historical Price",
description: { description: {
default: "Returns bitcoin historical price denominated in main currencies." default: "Returns bitcoin historical price denominated in main currencies. Available query parameters: <code>currency</code>, <code>timestamp</code>. If no parameter is provided, the full price history for all currencies is returned."
}, },
urlString: "/v1/historical-price", urlString: "/v1/historical-price?currency=EUR&timestamp=1500000000",
showConditions: [""], showConditions: [""],
showJsExamples: showJsExamplesDefaultFalse, showJsExamples: showJsExamplesDefaultFalse,
codeExample: { codeExample: {
@ -272,7 +272,7 @@ export const restApiDocsData = [
codeTemplate: { codeTemplate: {
commonJS: ``, commonJS: ``,
esModule: ``, esModule: ``,
curl: `/api/v1/historical-price`, curl: `/api/v1/historical-price?currency=EUR&timestamp=1500000000`,
}, },
codeSampleMainnet: { codeSampleMainnet: {
esModule: [], esModule: [],
@ -281,34 +281,18 @@ export const restApiDocsData = [
response: `{ response: `{
prices: [ prices: [
{ {
time: 1703692800, "time": 1499904000,
USD: 42972, "EUR": 1964,
EUR: 39590, "USD": 2254.9
GBP: 36803,
CAD: 56883,
CHF: 36486,
AUD: 63006,
JPY: 6124530
},
...
{
time: 1279497600,
USD: 0.08584,
EUR: -1,
GBP: -1,
CAD: -1,
CHF: -1,
AUD: -1,
JPY: -1
} }
], ],
exchangeRates: { exchangeRates: {
USDEUR: 0.92, "USDEUR": 0.92,
USDGBP: 0.86, "USDGBP": 0.78,
USDCAD: 1.32, "USDCAD": 1.36,
USDCHF: 0.85, "USDCHF": 0.89,
USDAUD: 1.47, "USDAUD": 1.53,
USDJPY: 142.52 "USDJPY": 149.48
} }
} }
` `