New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

fcoin-api

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fcoin-api

Use the package, you can use official api easily!

latest
Source
npmnpm
Version
1.0.6
Version published
Maintainers
1
Created
Source

Fcoin-api

For some people,use api easily!

脱胎于官方文档

Features

  • Promise styles (promise 风格的接口)
  • Support Instances (多实例)
  • 支持代理模式

Installation

npm install fcoin-api

Examples

const Fcoin = require('fcoin-api');

//Important
let fcoin = new Fcoin({
    key: '',
    secret: '',
    proxy: '' // 为空则不开启
})

/**
 * 行情接口(ticker)
 * @param {交易对} symbol 
 */
fcoin.getTicker('ethusdt').then(data => {})

/**
 * 深度查询
 * @param {L20 default} deep 
 * @param {交易对} symbol 
 */
fcoin.getDepth('L20','ethusdt').then(data => {})

/**
 * 创建订单(买卖)
 * @param {交易对} symbol 
 * @param {买卖方向} side 
 * @param {现价还是市价} type 
 * @param {价格, string} price 
 * @param {数量, string} amount 
 */
fcoin.createOrder(symbol, side, type, price, amount).then(data => {})

/**
 * 撤销订单(买卖)
 * @param {订单id} id 
 */
fcoin.cancelOrder(id).then(data => {})

/**
 * 查询账户资产
 */
fcoin.getBalance().then(data => {})

/**
 * 查询所有订单
 * @param {交易对} symbol  'submitted,filled'
 * @param {订单状态} states 
 * @param {每页限制数量} limit 
 * @param {在某个时间戳之后, string} after
 * @param {在某个时间戳之前, string} before
 */
fcoin.getOrders(symbol, states, limit, after, before).then(data => {})

/**
 * 获取指定 id 的订单 
 * @param {订单id} id 
 */
fcoin.getOrderByid(id).then(data => {})

Todo

  • Add Unit Test

Note

Any question about this project, you can write a issues to me.

In addition, if you are or will soon become a miner, you can join the telegram group

Keywords

api

FAQs

Package last updated on 17 May 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts