Luno-rs (async)
The Luno API wrapper written in rust of rust in rust prorgram
https://www.luno.com/en/developers/api.
Dependencies
- reqwest
- serde
- serde_json
- tokio
Configuration
- Add to Cargo.toml
luno_rs = "0.1.1"
or luno_rs = { git="https://github.com/borngraced/luno-rs"}
- Get your api key and secret from luno.com
- Create .env file in your project route and configure with:
API_KEY=myapikey
API_SECRET=myapisecret
- import Luno client to your project and initialize
use luno_rs::Luno;
```rust
[tokio::test] // any other async runtime can be used, not limited to tokio
async fn testlunoasync() {
dotenv::dotenv().ok();
let key = env::var("APIKEY").expect("Api Key doesn't exist yet, please add");
let secret = env::var("APISECRET").expect("Api Key Secret doesn't exist yet, please add");
let luno = lunors::Luno::init(key, secret).await;
let balance = luno.getallbalance().await;
assert!(tickers.isok());
let all_balance: Vec = balance.unwrap();
print!("{balance:#?}")
}
```
Available METHODS regularly (more will be added until completion)
available endpoints
- [x] create_account()
- [x] getallbalance()
- [x] get_ticker(pair: "XBTNGN")
- [x] getalltickers()
- [x] getfullorder_book(pair: "XBTNGN")
[x] gettoporder_book(pair: "XBTNGN")
Todos
[ ] updateaccountname
- [ ] listpendingtransactions
- [ ] list_transactions
- [ ] listaccountbalances
- [ ] listrecenttrades
- [ ] get_candles
- [ ] getmarketsinfo
- [ ] list_orders
- [ ] list_trades
- [ ] postmarketorder
- [ ] get_order
- [ ] postlimitorder
- [ ] cancel_order
- [ ] getreceiveraddress
- [ ] createreceiveraddress
- [ ] send
- [ ] estimatesendfee
- [ ] listwithdrawalrequest
- [ ] requestawithdrawal
- [ ] getwithdrawalrequest
- [ ] cancelwithdrawalrequest
- [ ] list_transfers
- [ ] list_eneficiaries
CONTRIBUTING
feel free to work on any of the todos:)
https://www.luno.com/en/developers/api.