Skip to content

Error after createBuyMarketOrder or createSellMarketOrder - SANDBOX MODE #1334

@felipeixoto

Description

@felipeixoto

Release number
6.0.2

Describe the bug
I am using sandobox mode in binance, and everything works well until i create an order (buy or sell) and i receive an error from xchange "Caused by: org.knowm.xchange.binance.dto.BinanceException: null (HTTP status code: 200)"

I am using createBuyMarketOrder and createSellMarketOrder, sending above 5 dollars for BTC/USDC pair:
OrderCreationResultDTO result = cassandreStrategy.createBuyMarketOrder(pair, new BigDecimal("0.00007"));

Once BinanceException occours, the result (OrderCreationResultDTO result) have a null order and I can't record trade. Even Cassandre can record on its tables (ORDERS and TRADES).

Even receiving the error "Caused by: org.knowm.xchange.binance.dto.BinanceException: null (HTTP status code: 200)" the order is executed because the balace of BTC and USDC changes along the times the buy or sell cassandre methods are called.

BEFORE ORDERS
BTC: total = 1.00291, available1.00291
USDC: total = 9696.20, available9696.20

SOME ORDERS AFTER
BTC: total = 1.00306, available 1.00306
USDC: total = 9680.23, available9680.23

Modes

sandbox mode

cassandre.trading.bot.exchange.modes.sandbox=true
cassandre.trading.bot.exchange.modes.dry=false

every time

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions