inv2004 / coinbase-pro-rs

Coinbase pro client for Rust

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

base_min_size not present in get_product, causing a crash

jehna opened this issue · comments

It seems that Coinbase has removed base_min_size from their product api, which causes get_product to crash to an error:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value:
Serde {
  error: Error("missing field `base_min_size`", line: 1, column: 388),
  data: "{\"id\":\"CRV-EUR\",\"base_currency\":\"CRV\",\"quote_currency\":\"EUR\",\"quote_increment\":\"0.0001\",\"base_increment\":\"0.01\",\"display_name\":\"CRV/EUR\",\"min_market_funds\":\"0.84\",\"margin_enabled\":false,\"fx_stablecoin\":false,\"max_slippage_percentage\":\"0.03000000\",\"post_only\":false,\"limit_only\":false,\"cancel_only\":false,\"trading_disabled\":false,\"status\":\"online\",\"status_message\":\"\",\"auction_mode\":false}"
}

Coinbase's announcement:
https://blog.coinbase.com/upcoming-changes-to-order-size-limits-2fed4dc31b5c

For API traders, please note that we will deprecate the use of base_min_size in our /products endpoint on June 2, 2022. On June 30, 2022, we will remove this variable from our endpoint. We will continue to maintain min_market_funds, with the new logic checking notional size of the order.

Will be fixed with

#47

In the mean time, you can point your cargo manifest at

coinbase-pro-rs = { verion = "0.7.1", git = "https://github.com/jeremy-prater/coinbase-pro-rs.git" }

@jeremy-prater updated + version lifted