https://github.com/thalkod/node-cfinex-api
Node Cfinex API is an asynchronous node.js library for the Cfinex API
https://github.com/thalkod/node-cfinex-api
Last synced: about 1 month ago
JSON representation
Node Cfinex API is an asynchronous node.js library for the Cfinex API
- Host: GitHub
- URL: https://github.com/thalkod/node-cfinex-api
- Owner: ThalKod
- License: mit
- Created: 2018-08-28T14:25:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-09-30T17:03:35.000Z (over 6 years ago)
- Last Synced: 2025-02-14T15:49:48.322Z (3 months ago)
- Language: JavaScript
- Homepage:
- Size: 55.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Node Cfinex API
Node Cfinex API is an asynchronous node.js library designed to help you make your own projects that interact with the [CFINEX API](https://cfinex.com).#### Installation
```
npm install node-cfinex-api --save
```
#### Getting started
```javascript
const cfinex = require("../node-cfinex-api")().options({
apikey: "",
apisecret: "",
});
```#### Instantiating Multiple Instances
```javascript
const cfinex = require('node-cfinex-api');const instance1 = cfinex.createInstance({
//
});const instance2 = cfinex.createInstance({
//
});
```#### Getting Markets
```javascript
cfinex.getMarkets((re)=>{
console.log("getmarkets()", re);
});
```View Response
```js
{ }
// Response
```#### Getting All Open Orders
```javascript
cfinex.getAllOpenOrders({ market: "BTC-LTC" }, (re)=>{
console.log("getAllOpenOrders()", re);
});
```View Response
```js
{ }
// Response
```#### Getting Markets Ticks
```javascript
cfinex.getTicks((re)=>{
console.log("getTicks()", re);
});
```View Response
```js
{ }
// Response
```#### Getting current balances
```javascript
cfinex.getBalances((ret)=>{
console.log("getBalances()", ret);
});
```View Response
```js
{ }
// Response
```#### Cancel an open orders
```javascript
cfinex.cancelOrder({ uid: 229392002 }, (re)=>{
console.log("cancelOrder()", re);
});
```View Response
```js
{ }
// Response
```#### Set a new Orders
```javascript
cfinex.setNewOrder({ pair: "LTC-BTC", type: "Buy", amount: 1000, price: 0.0001 }, (re)=>{
console.log("setNewOrder()", re);
});
```View Response
```js
{ }
// Response
```#### Get User open orders
```javascript
cfinex.getOpenOrders((re)=>{
console.log("getOpenOrders", re);
});
```View Response
```js
{ }
// Response
```#### Get account addresses
```javascript
cfinex.getAccountAddresses((re)=>{
console.log("getAccountAddresses()", re);
});
```View Response
```js
{ }
// Response
```