wisespace-io / binance-rs

Rust Library for the Binance API
Other
665 stars 297 forks source link

can deserialize Symbol's filters #17

Closed dizda closed 5 years ago

dizda commented 5 years ago

When requesting exchange informations, a part of the data were not included in the struct which this PR intends to fix.

Now:

        Symbol {
            symbol: "ZECUSDC",
            status: "TRADING",
            base_asset: "ZEC",
            base_asset_precision: 8,
            quote_asset: "USDC",
            quote_precision: 8,
            order_types: [
                "LIMIT",
                "LIMIT_MAKER",
                "MARKET",
                "STOP_LOSS_LIMIT",
                "TAKE_PROFIT_LIMIT"
            ],
            iceberg_allowed: true,
            is_spot_trading_allowed: true,
            is_margin_trading_allowed: false,
            filters: [
                PriceFilter {
                    min_price: "0.01000000",
                    max_price: "10000000.00000000",
                    tick_size: "0.01000000"
                },
                PercentPrice {
                    multiplier_up: "10",
                    multiplier_down: "0.1",
                    avg_price_mins: 5.0
                },
                LotSize {
                    min_qty: "0.00001000",
                    max_qty: "10000000.00000000",
                    step_size: "0.00001000"
                },
                MinNotional {
                    min_notional: "10.00000000",
                    apply_to_market: true,
                    avg_price_mins: 5.0
                },
                IcebergParts {
                    limit: 10
                },
                MaxNumAlgoOrders {
                    max_num_algo_orders: 5
                }
            ]
        }
wisespace-io commented 5 years ago

@dizda thank you for the contribution