Skip to content

servestack/ftx-api-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published