Giter VIP home page Giter VIP logo

python-api's Introduction

Quedex Official Python API

The best way to communicate with Quedex Bitcoin Derivatives Exchange using Python.

Show Me Some Code

Go straight to our Simple Trading Tutorial.

Why Is This Cool?

  • The API hides all technical concerns (transmission, encryption, serialization, threading and connection) from the user so that all programming efforts may be concentrated on trading logic.
  • We provide classes for easy integration with Twisted which is one of the best frameworks for programming network communication in Python. Twisted uses asynchronuous input/output which makes our API quite fast.
  • Simple Trading Tutorial is written in literate programming style and translates to simple_trading.py script which is a ready-to-run example of using the API. The same file is also used in API's end-to-end test.
  • The API is fully compatible with Python 2 and 3.

Important!

  • Next to this documentation, please read the general documentation of our WebSocket API.
  • Quedex Exchange uses an innovative schedule of session states. Some session states employ different order matching model - namely, Auction. Please consider this when placing orders.

Getting the API

To use the API in your Python project include the following in your requirements file (when installing with pip):

-e git+https://github.com/quedexnet/python-api.git@8bdde08#egg=quedex_api

Documentation

The fastest way of getting to know the API is by looking at the Simple Trading Tutorial. It shows how to set everything up using Autobahn on top of Twisted, listen for exchange events and how to send trading commands. If you prefer working with bare code, you can take a look at examples/simple_trading.py (it is generated from the tutorial).

Documentation of the API can be found in the code (mostly in MarketStream and UserStream classes). Integration with Twisted is implemented in UserStreamClientProtocol and MarketStreamClientProtocol classes.

The API is designed to be flexible and may be used with various implementations of WebSockets (other than Twisted). To this end, use MarketStream and UserStream with the WebSockets library of your choice. UserStreamClientProtocol and MarketStreamClientProtocol can be used as a reference on how to integrate MarketStream and UserStream classes with a WebSockets library.

Getting Credentials

You'll need to create an instance of Trader to use the API (for details see Simple Trading Tutorial). Trader needs to be provided with your account id and encrypted private key - you may find them in our web application - on the trading dashboard select the dropdown menu with your email address in the upper right corner and go to User Profile (equivalent to visiting https://quedex.net/webapp/profile when logged in).

The Exchange entity needs to be provided with the URL of our API, which is wss://api.quedex.net and our public key which for your convenience is bundled with the API - just import it like so from quedex_api import quedex_public_key.

Contributing Guide

Default channel for submitting questions regarding the API is opening new issues. In cases when information disclosure is not possible, you can contact us at [email protected].

In case you need to add a feature to the API, please submit an issue containing change proposal before submitting a PR.

Pull requests containing bugfixes are very welcome!

License

Copyright © 2017-2019 Quedex Ltd. API is released under Apache License Version 2.0.

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.