- Notifications
You must be signed in to change notification settings - Fork2
mfinancecombr/wallet-api
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
This is a small project for learning more Rust. It is a rewrite ofthis project started in Go by my friendMarcelometal
Jorge Vieira.
This package uses Rocket, which currently only builds with Rust nightly. Thisis about to change but, for now, if you are usingrustup
make sure you havethe nightly toolchain installed and run this on the project's directory:
rustup overrideset nightly
Otherwise make sure you always add+nightly
when calling cargo. The followingcommand will build and run the HTTP server:
cargo +nightly run
If all goes well you should now be able to look at the Swagger UI nicelyprovided byrocket-okapi:
http://localhost:8000/swagger-ui/
curl 'http://localhost:8000/api/v1/brokers' \-XPOST \-H 'Content-Type: application/json' \-d'{"name":"CLEAR"}'
curl 'http://localhost:8000/api/v1/portfolios' \-XPOST \-H 'Content-Type: application/json' \-d'{"name":"default"}'
curl 'http://localhost:8000/api/v1/events' \-XPOST \-H 'Content-Type: application/json' \-d'{ "eventType": "stock-operation", "time": "2020-10-05T00:00:00.000Z", "symbol": "BMGB4", "detail":{ "price": 4, "quantity": 500, "fees": 0, "type": "purchase", "portfolios": ["PORTFOLIO-ID"], "broker": "BROKER-ID" } }'
curl http://localhost:8000/api/v1/stocks/position/PETR4
About
Wallet API
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Contributors3
Uh oh!
There was an error while loading.Please reload this page.