Simple implementation of BitFex.Trade API for node.js
Add bitfex to package.json:
yarn add bitfex
# or
# npm install --save bitfex
After that you could use it in JS:
import Bitfex from 'bitfex'
Bitfex.auth({ email: 'user@example.com', password: 'password' })
.then({ jwt } => {
// you have now jwt token
})
params:
- password
Example:
Bitfex.auth({ email: 'user@example.com', password: 'password' }).then({ jwt, mfa } => ...)
In case of MFA enabled no JWT token returned, only mfa
returned - it's personal one time auth token for authMfa
params:
- authToken - received from
auth
method - otp - one time password
Bitfex.authMfa({ authToken: 'TOKEN', otp: '123456' }).then({ jwt } => ...)
Create new user
params:
- password
- username
Bitfex.signUp({ email: 'user@example.com', password: 'password', username: 'username' }).then({ success, errors } => ...)
params:
params:
- token
params:
- token
- page
- pair
params:
- token
- currency
params:
- token
- currency
- amount
- to
params:
- pair
params:
- token
params:
- pair
params:
- token
params:
- token
- code
params:
- token
params:
- token
- currency
- amount
params:
- token
- text
params:
- token
- pair
- operation
- amount
- price
params:
- token
- id
params:
- token
- scope
params:
- token
- scope
- subject
- content
params:
- password
- passwordConfirmation
- token
params:
- token
params:
- token (optional)
params:
- token
- title
- description
params:
- id
params:
- token
- id
- comment
params:
- token
- id
Released under the MIT License: https://opensource.org/licenses/MIT