Go to file
microwavedcola1 db4c54389c update client and lodash types
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2022-10-05 11:30:07 +02:00
.github
curl-demo
mango-bowl@83906d56cf
mango-service-v3 update client and lodash types 2022-10-05 11:30:07 +02:00
py
.gitignore
.gitmodules
Dockerfile
README.md nitpicky nonsense 2022-03-17 04:52:34 +00:00
docker-compose.yml
docker.env
entrypoint.sh
nginx.conf

README.md

Introduction

REST and WEBSOCKET API Services 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. Current motivation is to enable traders to bring their existing tools to mango markets.

Note

REST Service requires the 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 them back to the client for signing using their wallet. The advantages of this would be that we could have a centrally hosted service, and would save local hosting, the disadvantages of this would be complicating the REST clients users want to use with solana specific signing code and would need us to ship and maintain clients for various programming languages. Also such a centrally hosted service would then need authorization, authentication, rate limiting, etc. to prevent abuse of the configured RPC node, which so far is not the aim of this project.

WEBSOCKET API currently streams L1, and L2 level orderbook data.

Documentation

See https://microwavedcola1.github.io/mango-service-v3/#tag/default

Directory structure

.
├── README.md
├── mango-service-v3 - REST API Service for mango markets version 3
├── mango-bowl       - WEBSOCKET API Service for L1, L2 orderbook data for mango markets version 3  
└── py               - python3 client for above REST API Service

How to start the service:

git clone git@github.com:blockworks-foundation/mango-v3-service.git
cd mango-v3-service
git submodules init
git submodules update
docker-compose up
  • docker-compose up starts:
    • the REST API Service
    • the WEBSOCKET API Service
    • an nginx reverse proxy
  • Once the environment is running, the REST API and WEBSOCKET API are available on localhost
    • To test REST API: curl http://localhost/api/wallet/balances
    • To test websockets api: wscat --connect ws://localhost/ws

Todos

losely sorted in order of importance/priority

  • rpc node related issues
    • ensure that order has been placed or definitely not placed on the server side
    • some off chain services are used, these might use other nodes, mixing data from various nodes, might be problematic, what if one node is behind?
  • populate still undefined fields in various endpoints
  • todos sprinkled over code
  • when null vs when undefined as return field value,- doublecheck for every endpoint/dto
  • serum-history might be decomissioned, seek replacement
  • technical debt
    • cleanup tsconfig.json
    • add pre commit tools e.g. husky/pre-commit for code formatting and linting

Feedback

so far from beta tasters, from twitter, discord, etc.