Giter VIP home page Giter VIP logo

craes_pyclient's Introduction

Python client for CRAES

A simple static CLI

This project is a simple client example for CRAES, which can be found here. It reads CSV files of arbitrary complexity, parses and sends them to a running CRAES instance and parses the response from the exchange.

Installation and requirements

This project assumes Python 3.7+. This is not a hard requirement on the exchange side but comes from asyncio. The easiest way to use this client is by using poetry (see here). Assuming you are using poetry, you can run the client with

git clone 
cd craes_pyclient
poetry install
poetry run client

In case you do not want to use poetry, install the packages listed in pyproject.toml under the entry [tool.poetry.dependencies].

Usage

The client provides a CLI:

$ poetry run client --help
Usage: client [OPTIONS]

Options:
  --server_addr TEXT     Address CRAES is listening on
  --server_port INTEGER  Port CRAES is listening on
  --user_name TEXT       User name to authentificate with
  --passphrase TEXT      Passphrase to authentificate with
  --file TEXT            CSV file with orders to be sent
  --help                 Show this message and exit.

All arguments have default values that point towards a local instance with the test_user setup, sending the order file orders.csv commited in the repository.

For quick debugging and experimenting with the protocol, this package also provides a test server, which can be launched with poetry run testserver. This starts a WebSocket endpoint on the local machine which accepts orders, prints them to STDOUT and responds with an empty trade response.

craes_pyclient's People

Contributors

dbischof90 avatar

Watchers

James Cloos 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.