![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
gemini-cryptoexchange-api
Advanced tools
Simple typescript interface to the Gemini cryptoexchange.
This package provides a modern javascript solution for interfacing with the Gemini cryptoexchange API. Currently, only the REST API has been implemented. Support for for the Push API is in the works.
This library is intended to be used with ES6, TypeScript, etc. In the interest of moving towards the more-readable
async/await
pattern, callbacks are not supported. Only native Promise-based interaction is supported.
This library does not track your request rate. Gemini throttles/disables api access if the request rate exceeds certain limits. It is the responsibility of the user to track rate limits.
npm i gemini-cryptoexchange-api
yarn add gemini-cryptoexchange-api
import { getClient, IGeminiClient } from 'gemini-cryptoexchange-api';
const main = async (): Promise<{}> => {
try {
const client: IGeminiClient = getClient({
publicKey : '', // Your public key
privateKey: '', // Your private key
});
const { status, data } = await client.getAvailableBalances();
return Promise.resolve(data);
} catch (err) {
return Promise.reject(err);
}
};
main().then(data => console.log(data))
.catch(err => console.error(err));
This example shows usage without async/await
.
const gemini = require('gemini-cryptoexchange-api');
const client = gemini.getClient({
publicKey : '', // Your public key
privateKey: '', // Your private key
});
client.getAvailableBalances()
.then(response => {
const { status, data } = response;
console.log(data);
})
.catch(err => console.error(err));
Note: the remainder of this README.md will use TypeScript examples.
All endpoints are available via the client. If authentication keys are provided during client construction, public and private endpoints will succeed. If no keys are given, only public endpoints will succeed. Private endpoints will return a promise rejection when not authenticated, so be sure to properly trap your errors.
No attempt is made to mitigate private calls when not authenticated. It is the responsibility of the user to trap any errors resulting from incorrect/invalid authentication.
A few convenience properties and methods are provided:
This gives the user access to the underlying request forwarder. While not very useful to a user, it does expose the
request signing algorithm via rawAgent#signMessage
.
This method returns a boolean corresponding to whether or not the user has provided API keys to the client.
This method allows a user to upgrade a public client with credentials. If the client already has credentials, this method will replace the existing keys.
In order to place requests with public endpoints, simply instantiate the client with no parameters:
const client: IGeminiClient = getClient();
In order to authenticate a client with the Gemini API, a private request must provide a public key and a correctly signed request. This library handles request signatures - the user simply provides a public/private key pair. You can generate your own API keys through the Gemini interface.
FAQs
Simple typescript interface to the Gemini cryptoexchange.
The npm package gemini-cryptoexchange-api receives a total of 0 weekly downloads. As such, gemini-cryptoexchange-api popularity was classified as not popular.
We found that gemini-cryptoexchange-api demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.