gmosx / kraken-sdk-rust

A Rust SDK for working with Kraken APIs
Apache License 2.0
23 stars 14 forks source link

`FeeSchedule(f64, f64)` fields are private #30

Closed gitmalong closed 11 months ago

gitmalong commented 11 months ago

.. and can therefore not be read by library users :)

https://docs.rs/kraken_sdk_rest/0.19.0/kraken_sdk_rest/api/get_asset_pairs/struct.FeeSchedule.html

I would suggest to refactor the struct

from

#[derive(Debug, Deserialize, Clone)]
pub struct FeeSchedule(f64, f64);

to

#[derive(Debug, Deserialize, Clone)]
pub struct FeeSchedule {
  pub volume: f64,
  pub percent_fee: f64
}
gmosx commented 11 months ago

I made the fields public, in a follow-up PR I may also implement the refactoring you suggested (or you can send a PR).