#exchange #cryptocurrency #unified #crypto #restful

crypto-client

适用于所有加密货币交易所的统一RESTful客户端

1个不稳定版本

0.1.0 2020年12月30日

#49 in #restful

Apache-2.0

3KB

crypto-client

适用于所有加密货币交易所的统一客户端。

示例

use crypto_client::{CryptoClient, MarketType};

fn main() {
    let config: HashMap<&str, &str> = vec![
        ("eosAccount", "your-eos-account"),
        ("eosPrivateKey", "your-eos-private-key"),
    ].into_iter().collect();

    let crypto_client = CryptoClient::new(config);

    // buy
    let transaction_id = crypto_client.place_order(
        { exchange: "Newdex", pair: "EIDOS_EOS", market_type: "Spot" },
        0.00121,
        9.2644,
        false,
    );
    println!("{}", transactionId);
}

支持的交易所

  • 币安
  • 火币
  • OKEx
  • WhaleEx

依赖项

~3.5–8MB
~177K SLoC