blockworks-foundation / mango-client-ts

17 stars 16 forks source link

Cex style api #15

Closed feierabend654 closed 3 years ago

feierabend654 commented 3 years ago

Here is an initial draft for what I think is a cex style or rather a simpler API. I am still looking at the tests and there are some todos, but some initial feedback would be welcome. A method called getPnl is empty, not sure how to proceed there, so any pointers would be great.

closes #14

mschneider commented 3 years ago

tried building it locally, but got an error:

mango-client-ts $ yarn
yarn install v1.22.10
[1/5] 🔍  Validating package.json...
[2/5] 🔍  Resolving packages...
success Already up-to-date.
$ run-s clean build
yarn run v1.22.10
$ rm -rf lib
✨  Done in 0.10s.
yarn run v1.22.10
$ tsc --project ./tsconfig.production.json
src/simpleclient.ts:13:28 - error TS2307: Cannot find module '../lib' or its corresponding type declarations.

13 import { MangoGroup } from '../lib';
                              ~~~~~~~~

Found 1 error.

error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "build" exited with 2.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.