Coder Social home page Coder Social logo

apifiny-connector-python's Introduction

Apifiny OPEN API Connector Python

This is a library that works as a connector to APIFINY OPEN API

  • Supported APIs:
    • REST trading/market API

OPEN API Documentation

https://doc.apifiny.com/connect/#introduction

Install

pip3 install apifiny

Use windows, installing quickfix fails,Please use the link to download the file and install locally. https://www.lfd.uci.edu/~gohlke/pythonlibs/#quickfix

RESTful APIs

Usage examples:

from apifiny.rest_market import MarketData as MD_Client

md_client = MD_Client()
# Get BINANCE orderbook of BTCUSDT
print(client.market_order_book("BINANCE", "BTCUSDT"))
# Get BINANCE klines of BTCUSDT at 1m interval
print(md_client.market_kline("BINANCE", "BTC", "USDT", "1m"))
from apifiny.rest_api import API as Client

client = Client(False,"BINANCE")
# Get server timestamp
print(client.server_time())

# api key/secret are required for user data endpoints
client = Client(unified_url=False, venue="BINANCE", account_id='<account_id>', key='<api_key>', secret='<api_secret>')

# Post a new order
params = {
    "accountId": account_id,
    "venue": "BINANCE",
    "orderId": "",
    "orderInfo": {
        "limitPrice": "30000",
        "orderSide": "BUY",
        "orderType": "LIMIT",
        "quantity": "0.0001",
        "symbol": "BTCUSDT",
        "timeInForce": 1,
    }
}

response = client.new_order(**params)
print(response)

Please find examples folder to check for more endpoints.

Contributing

Contributions are welcome.
If you've found a bug within this project, please open an issue to discuss what you would like to change.
If it's an issue with the API, please new issue at apifiny-connector-python issues

apifiny-connector-python's People

Contributors

apifiny-io 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.