Releases: spiceai/spice.js
v0.3
Spice.xyz Node.js SDK v0.3
This release adds support for improved Prices APIs supporting spot/latest and historical prices for pair across Coinbase, Gemini, and tracked by Coinmarket Cap.
New functions available on the client are:
getPrice()
getPrices()
For full documentation see docs.spice.xyz.
What's Changed
- Add secrets by @lukekim in #16
- Fix env by @lukekim in #17
- Add
getPrice
andgetPrices
API by @lukekim in #25 - Bump rimraf from 4.0.7 to 4.3.0 by @dependabot in #30
- Bump @types/node from 18.11.18 to 18.14.6 by @dependabot in #31
New Contributors
- @dependabot made their first contribution in #30
Full Changelog: v0.2.0...v0.3.0
v0.2
Spice.xyz Node.js SDK v0.2
This release adds support for the new Spice.xyz Async Query API!
New functions available on the client are:
queryAsync()
getQueryResults()
getQueryResultsAll()
getQueryResultsFromNotification()
For full documentation see docs.spice.xyz.
What's Changed
- Add proper testing framework (Jest) by @phillipleblanc in #11
- Create dependabot.yml by @lukekim in #13
- Upgrade dependencies (gRPC & Arrow) by @lukekim in #14
- Add async query support by @lukekim in #15
New Contributors
Full Changelog: v0.1.0...v0.2.0
v0.1.0
Initial release of the Spice Node.js SDK.
Installation
npm install @spiceai/spice
or yarn add @spiceai/spice
Usage
Arrow Query
import { SpiceClient } from "@spiceai/spice";
const main = async () => {
const spiceClient = new SpiceClient("API_KEY");
const table = await spiceClient.query(
'SELECT number, "timestamp", gas_used FROM eth.recent_blocks LIMIT 10'
);
console.table(table.toArray());
};
main();
Querying data is done through a SpiceClient
object that initializes the connection with Spice endpoint. SpiceClient
has the following arguments:
apiKey
(string, required): API key to authenticate with the endpoint.url
(string, optional): URL of the endpoint to use (default: flight.spiceai.io:443)
Documentation
Check out our API documentation to learn more about how to use the Node.js SDK.