mango-v4-service/mango-service-v3
microwavedcola1 4a2f0e26da fix key loading
Signed-off-by: microwavedcola1 <microwavedcola@gmail.com>
2021-09-24 13:56:27 +02:00
..
.vscode Rework 2021-09-17 00:11:09 +02:00
src fix key loading 2021-09-24 13:56:27 +02:00
.dockerignore Rework 2021-09-17 00:11:09 +02:00
Dockerfile Rework 2021-09-17 00:11:09 +02:00
README.md update docs 2021-09-23 22:42:56 +02:00
package.json Rework 2021-09-17 00:11:09 +02:00
service-v3.postman_collection.json update 2021-09-23 22:34:23 +02:00
service-v3.yml update 2021-09-23 22:34:23 +02:00
tsconfig.json Rework 2021-09-17 00:11:09 +02:00
tslint.json Rework 2021-09-17 00:11:09 +02:00
yarn.lock update 2021-09-23 22:34:23 +02:00

README.md

A REST API server on top of mango markets v3, written in typescript + expressjs + using mango client and some other off chain REST services.

How to run while developing

  • expects your private key to be present in ~/.config/solana/id.json
  • yarn install
  • PORT=3000 GROUP=mainnet.1 CLUSTER_URL=https://api.mainnet-beta.solana.com yarn nodemon ./src/server.ts

How to run using docker

  • docker pull microwavedcola/mango-service-v3
  • 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. 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