update docs

Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
This commit is contained in:
microwavedcola1 2021-09-23 22:42:56 +02:00
parent 1ca49ab5cd
commit bb8592116c
3 changed files with 20 additions and 9 deletions

View File

@ -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/

View File

@ -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`

View File

@ -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