Coder Social home page Coder Social logo

luno-rs's Introduction

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

  1. Add to Cargo.toml luno_rs = "0.1.1" or luno_rs = { git="https://github.com/borngraced/luno-rs"}
  2. Get your api key and secret from luno.com
  3. Create .env file in your project route and configure with: API_KEY=myapikey API_SECRET=myapisecret
  4. import Luno client to your project and initialize use luno_rs::Luno;
#[tokio::test] // any other async runtime can be used, not limited to tokio
async fn test_luno_async() {
	dotenv::dotenv().ok();
	let key = env::var("API_KEY").expect("Api Key doesn't exist yet, please add");
	let secret = env::var("API_SECRET").expect("Api Key Secret doesn't exist yet, please add");
	let luno = luno_rs::Luno::init(key, secret).await;
	let balance = luno.get_all_balance().await;
	assert!(balance.is_ok());
    let all_balance: Vec<Balance> = balance.unwrap();
    print!("{balance:#?}")
}

Available METHODS regularly (more will be added until completion)

available endpoints

  1. create_account()
  2. get_all_balance()
  3. get_ticker(pair: "XBTNGN")
  4. get_all_tickers()
  5. get_full_order_book(pair: "XBTNGN")
  6. get_top_order_book(pair: "XBTNGN")

Todos

  1. update_account_name
  2. list_pending_transactions
  3. list_transactions
  4. list_account_balances
  5. list_recent_trades
  6. get_candles
  7. get_markets_info
  8. list_orders
  9. list_trades
  10. post_market_order
  11. get_order
  12. post_limit_order
  13. cancel_order
  14. get_receiver_address
  15. create_receiver_address
  16. send
  17. estimate_send_fee
  18. list_withdrawal_request
  19. request_a_withdrawal
  20. get_withdrawal_request
  21. cancel_withdrawal_request
  22. list_transfers
  23. list_eneficiaries

CONTRIBUTING

feel free to work on any of the todos:)

https://www.luno.com/en/developers/api.

luno-rs's People

Contributors

borngraced avatar thormighti avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

luno-rs's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.