npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

gate-api-test

v1.1.1

Published

Welcome_to_Gate_io_APIAPIv4_provides_spot_margin_and_futures_trading_operations__There_are_public_APIs_to_retrieve_the_real_time_market_statistics_and_private_APIs_which_needs_authentication_to_trade_on_users_behalf_

Downloads

4

Readme

gate-api

GateApi - JavaScript client for gate-api Welcome to Gate.io API

APIv4 provides spot, margin and futures trading operations. There are public APIs to retrieve the real-time market statistics, and private APIs which needs authentication to trade on user's behalf. This SDK is automatically generated by the OpenAPI Generator project:

  • API version: 4.24.0
  • Package version: 5.24.0
  • Build package: org.openapitools.codegen.languages.JavascriptClientCodegen For more information, please visit https://www.gate.io/page/contacts

Versioning

Trying our best to follow the semantic versioning, while enjoying recent features provided by programming language and libraries, from 4.15.2, one major versioning difference will be introduced:

If extra code rewrite is required when you upgrade the SDK, such as:

  • some outdated programming language version support is dropped
  • API method signature has breaking changes.

the MAJOR version will be incremented, but the MINOR and PATCH version are still following REST API's instead of resetting to 0, so that you can recognize it has some breaking changes, but still getting the idea of from which REST API version the change is introduced.

For example, the previous REST API and SDK version are both 4.14.0. But if we decide to introduce some breaking changes in SDK along with REST API 4.15.2 upgrade, then the version of next SDK release will be 5.15.2(the MAJOR version is incremented to denote breaking changes, but the MINOR and PATCH version are identical to REST API's instead of resetting them to 0)

If MAJOR version is incremented, make sure you read the release note on Releases page

Installation

git

If the library is hosted at a git repository, e.g. https://github.com/gateio/gateapi-js then install it via:

    npm install gateio/gateapi-js --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file, that's to say your javascript file where you actually use this library):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Webpack Configuration

Using Webpack you may encounter the following error: "Module not found: Error: Cannot resolve module", most certainly you should disable AMD loader. Add/merge the following section to your webpack config:

module: {
  rules: [
    {
      parser: {
        amd: false
      }
    }
  ]
}

Getting Started

Please follow the installation instruction and execute the following JS code:

var GateApi = require('gate-api');

var apiInstance = new GateApi.DeliveryApi();
var settle = "usdt"; // String | Settle currency
var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
apiInstance.listDeliveryContracts(settle, callback);

Documentation for API Endpoints

All URIs are relative to https://api.gateio.ws/api/v4

Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- DeliveryApi | listDeliveryContracts | GET /delivery/{settle}/contracts | List all futures contracts DeliveryApi | getDeliveryContract | GET /delivery/{settle}/contracts/{contract} | Get a single contract DeliveryApi | listDeliveryOrderBook | GET /delivery/{settle}/order_book | Futures order book DeliveryApi | listDeliveryTrades | GET /delivery/{settle}/trades | Futures trading history DeliveryApi | listDeliveryCandlesticks | GET /delivery/{settle}/candlesticks | Get futures candlesticks DeliveryApi | listDeliveryTickers | GET /delivery/{settle}/tickers | List futures tickers DeliveryApi | listDeliveryInsuranceLedger | GET /delivery/{settle}/insurance | Futures insurance balance history FlashSwapApi | listFlashSwapCurrencies | GET /flash_swap/currencies | List all supported currencies in flash swap FuturesApi | listFuturesContracts | GET /futures/{settle}/contracts | List all futures contracts FuturesApi | getFuturesContract | GET /futures/{settle}/contracts/{contract} | Get a single contract FuturesApi | listFuturesOrderBook | GET /futures/{settle}/order_book | Futures order book FuturesApi | listFuturesTrades | GET /futures/{settle}/trades | Futures trading history FuturesApi | listFuturesCandlesticks | GET /futures/{settle}/candlesticks | Get futures candlesticks FuturesApi | listFuturesTickers | GET /futures/{settle}/tickers | List futures tickers FuturesApi | listFuturesFundingRateHistory | GET /futures/{settle}/funding_rate | Funding rate history FuturesApi | listFuturesInsuranceLedger | GET /futures/{settle}/insurance | Futures insurance balance history FuturesApi | listContractStats | GET /futures/{settle}/contract_stats | Futures stats FuturesApi | getIndexConstituents | GET /futures/{settle}/index_constituents/{index} | Get index constituents FuturesApi | listLiquidatedOrders | GET /futures/{settle}/liq_orders | Retrieve liquidation history MarginApi | listMarginCurrencyPairs | GET /margin/currency_pairs | List all supported currency pairs supported in margin trading MarginApi | getMarginCurrencyPair | GET /margin/currency_pairs/{currency_pair} | Query one single margin currency pair MarginApi | listFundingBook | GET /margin/funding_book | Order book of lending loans MarginApi | listCrossMarginCurrencies | GET /margin/cross/currencies | Currencies supported by cross margin. MarginApi | getCrossMarginCurrency | GET /margin/cross/currencies/{currency} | Retrieve detail of one single currency supported by cross margin OptionsApi | listOptionsUnderlyings | GET /options/underlyings | List all underlyings OptionsApi | listOptionsExpirations | GET /options/expirations | List all expiration times OptionsApi | listOptionsContracts | GET /options/contracts | List all the contracts with specified underlying and expiration time OptionsApi | getOptionsContract | GET /options/contracts/{contract} | Query specified contract detail OptionsApi | listOptionsSettlements | GET /options/settlements | List settlement history OptionsApi | getOptionsSettlement | GET /options/settlements/{contract} | Get specified contract's settlement OptionsApi | listOptionsOrderBook | GET /options/order_book | Futures order book OptionsApi | listOptionsTickers | GET /options/tickers | List tickers of options contracts OptionsApi | listOptionsUnderlyingTickers | GET /options/underlying/tickers/{underlying} | Get underlying ticker OptionsApi | listOptionsCandlesticks | GET /options/candlesticks | Get futures candlesticks OptionsApi | listOptionsUnderlyingCandlesticks | GET /options/underlying/candlesticks | Mark price candlesticks of an underlying OptionsApi | listOptionsTrades | GET /options/trades | Options trade history SpotApi | listCurrencies | GET /spot/currencies | List all currencies' details SpotApi | getCurrency | GET /spot/currencies/{currency} | Get details of a specific currency SpotApi | listCurrencyPairs | GET /spot/currency_pairs | List all currency pairs supported SpotApi | getCurrencyPair | GET /spot/currency_pairs/{currency_pair} | Get details of a specifc order SpotApi | listTickers | GET /spot/tickers | Retrieve ticker information SpotApi | listOrderBook | GET /spot/order_book | Retrieve order book SpotApi | listTrades | GET /spot/trades | Retrieve market trades SpotApi | listCandlesticks | GET /spot/candlesticks | Market candlesticks WalletApi | listCurrencyChains | GET /wallet/currency_chains | List chains supported for specified currency

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.