ftx-api-client

1.0.0 • Public • Published

FTX API CLIENT

Use this lib to call ftx api, without dealing the complex authentication mechanism

Installing / Getting started

npm install ftx-api-client --save

After installation, you required FTX Account's API_KEY & API_SECRET also optional Subaccount

Initialize the Api Client

const ftxApiClient = new require('ftx-api-client')({
    api_key: "<ftx-api-key>",
    api_secret: "<ftx-api-secret>",
    subaccount: "<ftx-subaccount>" // optional
});

Call any api using call method, which accept an option as parameter, and options has following properties

  • resource : FTX API Resource to call like /account
  • method : API Method like POST GET PUT DELETE
  • data : (optional) data object for POST & PUT request

Let's call api to get the account info

ftxApiClient({
    resource: '/account',
    method: 'GET'
})
.then(console.log)
.catch(console.error)

Package Sidebar

Install

npm i ftx-api-client

Weekly Downloads

2

Version

1.0.0

License

ISC

Unpacked Size

3.47 kB

Total Files

3

Last publish

Collaborators

  • pawanpandey