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 Automated security scanning (#7) 2022-01-11 16:01:06 +01:00
curl-demo demo and fix python 2021-10-14 09:59:24 +02:00
mango-bowl@83906d56cf Update to docker image with lesser known vulnerabilities 2022-02-06 13:51:57 +01:00
mango-service-v3 update client and lodash types 2022-10-05 11:30:07 +02:00
py fix type 2022-02-10 09:48:21 +01:00
.gitignore add account info 2021-11-17 17:46:42 +01:00
.gitmodules add mango-bowl 2021-12-17 22:20:01 +01:00
Dockerfile unified-api 2021-12-09 07:02:23 +01:00
README.md nitpicky nonsense 2022-03-17 04:52:34 +00:00
docker-compose.yml fix environment variables 2022-01-14 15:38:49 +01:00
docker.env unified-api 2021-12-09 07:02:23 +01:00
entrypoint.sh unified-api 2021-12-09 07:02:23 +01:00
nginx.conf add mango-bowl 2021-12-17 22:20:01 +01:00

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.