GithubHelp home page GithubHelp logo

hbdmapi / huobi_future_async Goto Github PK

View Code? Open in Web Editor NEW
7.0 6.0 5.0 20 KB

An Asynchronous API(Restful+Websocket) Library of Huobi Future.

License: Other

Rust 100.00%
huobi-future api huobi-future-api asynchronous rust websocket huobi-future-async

huobi_future_async's Introduction

huobi_future_async

Rust Async Library for the Huobi Future API(restful+websocket)

MIT licensed Apache-2.0 licensed

Usage

Add this to your Cargo.toml

[dependencies]
huobi_future_async = { git = "https://github.com/hbdmapi/huobi_future_async.git" }

Risk Warning

Use at your own risk. We will not be responsible for your investment losses.

Example

git clone https://github.com/hbdmapi/huobi_future_async.git
cd huobi_future_async
cd examples
// add your api key and secret key in endpoints.rs.
vim endpoints.rs
cargo run --example endpoints
// add you api key and secret key in websocket.rs
vim websocket.rs
cargo run --example websocket

Happy Coding!

Implemented Restful APIs

Interface Method Name API Doc
Get Contract Info(/api/v1/contract_contract_info) get_contract_info https://huobiapi.github.io/docs/dm/v1/cn/#6b15dcb6a3
Get Market Depth(/market/depth) get_all_book_tickers https://huobiapi.github.io/docs/dm/v1/cn/#1716b8327e
Get Klines(/market/history/kline) get_klines https://huobiapi.github.io/docs/dm/v1/cn/#k
Get Index Klines(/index/market/history/index) get_index_klines https://huobiapi.github.io/docs/dm/v1/cn/#k-2
Get Basis Data(/index/market/history/basis) get_basis https://huobiapi.github.io/docs/dm/v1/cn/#8cfe8b0489
Get Merged Data(/market/detail/merged) get_merged_data https://huobiapi.github.io/docs/dm/v1/cn/#k
Get Price Limit(/api/v1/contract_price_limit) get_price_limit https://huobiapi.github.io/docs/dm/v1/cn/#025c787500
Get Account Info(/api/v1/contract_account_info) get_account_info https://huobiapi.github.io/docs/dm/v1/cn/#e807c44c06
Get Account and Position Info(/api/v1/contract_account_position_info) get_account_position_info https://huobiapi.github.io/docs/dm/v1/cn/#2aa4c454c6
Place Order(/api/v1/contract_order) place_order https://huobiapi.github.io/docs/dm/v1/cn/#9dc85ffb46
Place Orders(/api/v1/contract_batchorder) place_orders https://huobiapi.github.io/docs/dm/v1/cn/#33123f0c09
Lightning close(/api/v1/lightning_close_position) lightning_close https://huobiapi.github.io/docs/dm/v1/cn/#k
Cancel order(/api/v1/contract_cancel) cancel_orders https://huobiapi.github.io/docs/dm/v1/cn/#4e53c0fccd
Cancel all orders(/api/v1/contract_cancelall) cancel_allorders https://huobiapi.github.io/docs/dm/v1/cn/#f175a031e7
Get order info(/api/v1/contract_order_info) get_order_info https://huobiapi.github.io/docs/dm/v1/cn/#f36cfcbaef
Get order detail(/api/v1/contract_order_detail) cancel_orders https://huobiapi.github.io/docs/dm/v1/cn/#81b4bd7186
Get open orders(/api/v1/contract_openorders) get_open_orders https://huobiapi.github.io/docs/dm/v1/cn/#dd332a7a9c
Place trigger orders(/api/v1/contract_trigger_order) place_trigger_order https://huobiapi.github.io/docs/dm/v1/cn/#97a9bd626d
Cancel trigger orders(/api/v1/contract_trigger_cancel) cancel_trigger_orders https://huobiapi.github.io/docs/dm/v1/cn/#0d42beab34
Cancel all trigger orders(/api/v1/contract_trigger_cancelall) cancel_all_trigger_orders https://huobiapi.github.io/docs/dm/v1/cn/#3d2471d520
Get open trigger orders(/api/v1/contract_trigger_openorders) get_trigger_open_orders https://huobiapi.github.io/docs/dm/v1/cn/#b5280a27b3
Get history trigger orders(/api/v1/contract_trigger_hisorders) get_trigger_his_orders https://huobiapi.github.io/docs/dm/v1/cn/#37aeb9f3bd
Get transfer limit(/api/v1/contract_transfer_limit) get_transfer_limit https://huobiapi.github.io/docs/dm/v1/cn/#36078ddf99
Transfer between spot and future(https://api.huobi.pro/v1/futures/transfer) transfer https://huobiapi.github.io/docs/dm/v1/cn/#88a4ecc2bc

Implemented Websocket Interfaces

Support All the websocket subscriptions of API docs:

huobi_future_async's People

Contributors

foonsun avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.