Closed objectt closed 5 years ago
int market_put_market_order(.....) { .... mpd_t *balance = balance_get(user_id, BALANCE_TYPE_AVAILABLE, m->money); if (!balance || mpd_cmp(balance, amount, &mpd_ctx) < 0) return -1; ....
@haipome What does this line imply? Does it mean you cannot bid below your total balance even though 'money' can worth way more than 'stock'?
The amount in market buy order is actual the money you want to pay, so it has to check you have enough money available.
@haipome What does this line imply? Does it mean you cannot bid below your total balance even though 'money' can worth way more than 'stock'?