From bb8592116cccd1403551380364d7bd7b47bb3daa Mon Sep 17 00:00:00 2001 From: microwavedcola1 Date: Thu, 23 Sep 2021 22:42:56 +0200 Subject: [PATCH] update docs Signed-off-by: microwavedcola1 --- README.md | 24 +++++++++++++++++------- mango-service-v3/README.md | 2 +- py/README.md | 3 ++- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b5495b7..55ef936 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,17 @@ # Introduction -REST API Service for mango markets version 3, and some simple clients and examples. Aimed to follow spec as close as possible to popular exchanges like ftx, etc. Motivation is that the experienced traders can bring their existing tools to mango markets. Service requires user to run a local copy with his/her own private key. See postman export to see what is already implemented. +REST API Service for mango markets version 3, and some simple clients and examples. + +# Aim +Aimed to follow spec as close as possible to popular exchanges like ftx, etc. + +# Motivation +Traders should be able to bring their existing tools to mango markets. + +# Note +REST Service requires user to run a local copy with his/her own private key. An alternative approach which is known and was not taken is to prepare solana transactions in a centrally hosted REST API Service and send back to client for signing with his wallet. + +# Documentation +See https://microwavedcola1.github.io/mango-service-v3/#tag/default Directory structure ``` @@ -8,15 +20,12 @@ Directory structure ├── mango-service-v3 - REST API Service for mango markets version 3 └── py - python3 client for above REST API Service ``` - -# Documentation -See https://microwavedcola1.github.io/mango-service-v3/#tag/default - # Contributing See Todos # Todos ## Small +losely sorted in order of importance/priority - cache various mango related things which change infrequently like e.g. spot+perp markets, placed orders for user, etc. - combine instructions e.g. cancel+place-> modify, cancel many - order types e.g. stop loss, market orders @@ -28,8 +37,9 @@ See Todos - todos sprinkled over code - when null vs when undefined as return field value,- doublecheck for every endpoint/dto - how often to load/reload certain mango things e.g. account, cache, rootbanks, etc.? -- cleanup tsconfig.json -- add pre commit tools e.g. husky/pre-commit for code formatting and linting +- technical debt + - cleanup tsconfig.json + - add pre commit tools e.g. husky/pre-commit for code formatting and linting ## Large - integration with freqtrade and/or ccxt https://github.com/ccxt/ccxt/blob/master/js/ftx.js - integration with tradingview or https://github.com/thibaultyou/tradingview-alerts-processor/blob/master/docs/2_Alerts.md & https://www.tradingview.com/support/solutions/43000529348-about-webhooks/ diff --git a/mango-service-v3/README.md b/mango-service-v3/README.md index 5322d97..7bf534f 100644 --- a/mango-service-v3/README.md +++ b/mango-service-v3/README.md @@ -11,7 +11,7 @@ A REST API server on top of mango markets v3, written in typescript + expressjs * `docker run -p 3000:3000 -e GROUP=mainnet.1 -e CLUSTER_URL=https://api.mainnet-beta.solana.com -v ~/.config:/root/.config microwavedcola/mango-service-v3` # Notes -You probably want to choose a private RPC node instead of the `https://api.mainnet-beta.solana.com` where one quickly ends up with HTTP 429s +You probably want to choose a private RPC node instead of the `https://api.mainnet-beta.solana.com` where one quickly ends up with HTTP 429s. At the moment the service internally uses a simple round robin rotation within well known nodes as a target rpc node, so the CLUSTER_URL is not just the only one used. This should be made explicit opt-in only, so that users with private nodes can just use that node since it would be more reliable than shared rpc nodes. # How to test * via postman, see `service-v3.postman_collection.json` diff --git a/py/README.md b/py/README.md index 97cc64c..d246c9a 100644 --- a/py/README.md +++ b/py/README.md @@ -9,7 +9,8 @@ A python3 client with some examples for the mango markets v3 REST Service # How to test examples while developing * `poetry install` * `poetry shell` -* `python basic.py` +* try out a example `python basic.py` # Todos +* add more examples * add pre-commit e.g. black, pylint, mypy, reorder-python-imports