Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New URLs for v1 prices #96

Merged
merged 3 commits into from
Oct 18, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class SpiceClient {
throw new Error('At least one pair is required');
}

const resp = await this.fetchInternal(`/v1/prices/latest?pair=` + pairs.join(","));
const resp = await this.fetchInternal(`/v1/prices?pairs=` + pairs.join(","));
if (!resp.ok) {
throw new Error(
`Failed to get latest prices V1: ${resp.statusText} (${await resp.text()})`
Expand All @@ -119,7 +119,7 @@ public async getPrices(pair: string[], startTime?: number, endTime?: number, gra
if (!pair || pair.length == 0) {
throw new Error('Pair is required');
}
var url = `/v1/prices?pair=${pair.join(",")}`
var url = `/v1/prices/historical?pairs=${pair.join(",")}`
if (startTime) {
url += `&start=${startTime}`
}
Expand Down
Loading