Crates.io | rusftx |
lib.rs | rusftx |
version | 0.4.0 |
source | src |
created_at | 2022-11-02 02:37:29.341084 |
updated_at | 2022-11-03 22:04:12.12953 |
description | Rust bindings for the FTX REST and Websocket API |
homepage | |
repository | https://github.com/elertan/rusftx |
max_upload_size | |
id | 703211 |
size | 500,611 |
Not all APIs are implemented yet. If you need a specific API, please open an issue, or consider contributing by creating a pull request.
RusFTX has taken inspiration from the existing ftx crate by Fabian Boesiger.
RusFTX supports both API key and subaccount authentication, as well as having the ability to provide a custom endpoint (which could be used for proxies for example).
RusFTX has implemented endpoints for both FTX (.com) and FTX-US (.us) which can be configured using EndpointCom
and EndpointUs
.
let api_key = "YOUR_FTX_API_KEY";
let secret = "YOUR_FTX_SECRET";
let rest_api = RestApiWithAuthenticationBuilder::new()
.endpoint(EndpointCom)
.authentication(api_key, secret)
.build();
You can also use the Rustftx without authentication for endpoints that support it.
let rest_api = RestApi::new(EndpointCom);
Pagination can be performed using the start_time
and end_time
parameters on all endpoints that support it by providing a chrono DateTime<Utc>
.