npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

fcoin-api

v1.0.6

Published

Use the package, you can use official api easily!

Downloads

23

Readme

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