The `gate-api` package provides a TypeScript and JavaScript client for interacting with Gate.io's APIv4. It enables operations across spot, margin, and contract trading, offering both public interfaces for market data and authenticated private interfaces for automated trading. Currently at version 7.2.67, this SDK is automatically generated using OpenAPI Generator, targeting Node.js environments due to the security implications of storing API secrets in a browser. The package employs a unique versioning strategy: the MAJOR version increments only for breaking SDK changes, while the MINOR and PATCH versions directly reflect the underlying REST API version, allowing developers to correlate SDK changes with specific API updates. This client is distinct from `gateapi-js`, which is intended for public endpoints in browser environments.
npm install gate-apiVerified import paths — ran on the pinned version, not inferred.
Initializes the Gate.io client with API key authentication and fetches user account details.
Review the GitHub releases page (github.com/gate/gateapi-nodejs/releases) for specific breaking changes and migration guides when a major version is incremented.
Generate new APIv4 keys on the Gate.io platform and update your application to use the `gate-api` client, ensuring all API calls adhere to the v4 specification.
Ensure that `gate-api` is used exclusively in secure server-side Node.js environments. Do not embed API keys or secrets in client-side code accessible via browsers.
Implement exponential back-off strategies for retrying failed API requests, especially for 5xx server errors. Avoid immediate retries and consider rate limit headers if provided by the API. For 4xx client errors, correct the request before retrying.
Verify `API_KEY` and `API_SECRET` are correct. Check the IP whitelist settings for your API key on the Gate.io platform. Ensure your system's clock is synchronized for correct timestamp-based signatures.
Implement proper rate limiting and exponential back-off logic in your application. Consult Gate.io's API documentation for specific rate limit details and best practices for polling.
Review the specific error message returned in the response body for details. Cross-reference your request parameters against the Gate.io APIv4 documentation for the endpoint you are calling to ensure correctness.
No dependency data recorded yet.