24 lines
541 B
Rust
24 lines
541 B
Rust
use bitfinex::api::Bitfinex;
|
|
|
|
mod ticker;
|
|
mod events;
|
|
mod pairs;
|
|
mod positions;
|
|
mod strategy;
|
|
mod bot;
|
|
mod currency;
|
|
|
|
|
|
pub type BoxError = Box<dyn std::error::Error + Send + Sync>;
|
|
|
|
#[tokio::main]
|
|
async fn main() -> Result<(), BoxError> {
|
|
let TEST_API_KEY="P1EVE68DJByDAkGQvpIkTwfrbYXd2Vo2ZaIhTYb9vx2";
|
|
let TEST_API_SECRET="1nicg8z0zKVEt5Rb7ZDpIYjVYVTgvCaCPMZqB0niFli";
|
|
|
|
let bfx = Bitfinex::new(Some(TEST_API_KEY.into()), Some(TEST_API_SECRET.into()));
|
|
|
|
println!("{:?}", bfx.positions.active_positions().await);
|
|
Ok(())
|
|
}
|