Expand description
§Wex API
API implementation for the Wex market-place.
Please Donate
- BTC: 17voJDvueb7iZtcLRrLtq3dfQYBaSi2GsU
- ETC: 0x7bC5Ff6Bc22B4C6Af135493E6a8a11A62D209ae5
- XMR: 49S4VziJ9v2CSkH6mP9km5SGeo3uxhG41bVYDQdwXQZzRF6mG7B4Fqv2aNEYHmQmPfJcYEnwNK1cAGLHMMmKaUWg25rHnkm
Wex API Documentation:
- https://wex.nz/api/3/docs
- https://wex.nz/tapi/docs
§Example
extern crate wex;
fn main() {
let account = wex::Account {
key: String::from("<your-key>"),
secret: String::from("<your-secret>"),
};
println!("{:?}", wex::info());
println!("{:?}", wex::get_info(&account));
// currency pair chain :)
let info = wex::info().expect("could not optain wex pairs");
let pairs: Vec<&String> = info.pairs.keys().collect();
let mut pairchain = pairs.iter().fold(
String::new(),
|data, item| data + item + "-",
);
pairchain.pop(); // remove last `-`
// ticker all pairs at once :D
let ticks = wex::ticker(&pairchain).expect("could not ticker");
}
Structs§
- Account
- Representing a key secret pair from Wex.
- Active
Order - Cancel
Result - Depth
- Fund
Info - Fund
Rights - History
Query - Info
- Info
Pair - Order
Info - Public
Trade - Tick
Pair - Trade
History Entry - Trade
Result - Transaction
History Entry - WexResult
Enums§
Functions§
- active_
orders - Returns the list of your active orders. If the order disappears from the list, it was either executed or canceled.
- cancel_
order - This method is used for order cancelation.
- coin_
deposit_ address - This method can be used to retrieve the address for depositing crypto-currency.
- depth
- This method provides the information about active orders on the pair.
- get_
info - Returns information about the user’s current balance, API-key privileges, the number of open orders and Server Time. To use this method you need a privilege of the key info.
- info
- This method provides all the information about currently active pairs.
- order_
info - Returns the information on particular order.
- ticker
- This method provides all the information about currently active pairs
- trade
- Create orders.
- trade_
history - Returns trade history.
- trades
- This method provides the information about the last trades.
- trans_
history - Returns the history of transactions.