Skip to content

Conversation

@pcriadoperez
Copy link
Collaborator

@pcriadoperez pcriadoperez commented Nov 13, 2024

Dependent on PR #1464

@pcriadoperez pcriadoperez reopened this Nov 20, 2024
@carlosmiei carlosmiei changed the title Add tests feat(client): add tests/ gift card API/ multiple fixes Nov 21, 2024
@carlosmiei
Copy link
Collaborator

DEMO swap

python examples/create_order_async.py
{'orderId': 4067449380, 'symbol': 'BTCUSDT', 'status': 'NEW', 'clientOrderId': 'x-Cb7ytekJ37b8cfbafacdfa36cd379', 'price': '0.00', 'avgPrice': '0.00', 'origQty': '0.010', 'executedQty': '0.000', 'cumQty': '0.000', 'cumQuote': '0.00000', 'timeInForce': 'GTC', 'type': 'MARKET', 'reduceOnly': True, 'closePosition': False, 'side': 'SELL', 'positionSide': 'LONG', 'stopPrice': '0.00', 'workingType': 'CONTRACT_PRICE', 'priceProtect': False, 'origType': 'MARKET', 'priceMatch': 'NONE', 'selfTradePreventionMode': 'NONE', 'goodTillDate': 0, 'updateTime': 1732204122751}
{'orderId': 4067449380, 'symbol': 'BTCUSDT', 'status': 'FILLED', 'clientOrderId': 'x-Cb7ytekJ37b8cfbafacdfa36cd379', 'price': '0.00', 'avgPrice': '99971.20000', 'origQty': '0.010', 'executedQty': '0.010', 'cumQuote': '999.71200', 'timeInForce': 'GTC', 'type': 'MARKET', 'reduceOnly': True, 'closePosition': False, 'side': 'SELL', 'positionSide': 'LONG', 'stopPrice': '0.00', 'workingType': 'CONTRACT_PRICE', 'priceProtect': False, 'origType': 'MARKET', 'priceMatch': 'NONE', 'selfTradePreventionMode': 'NONE', 'goodTillDate': 0, 'time': 1732204122751, 'updateTime': 1732204122751}
[{'symbol': 'LTCUSDT', 'positionSide': 'LONG', 'positionAmt': '3.300', 'entryPrice': '78.63030303029', 'breakEvenPrice': '78.65361575758', 'markPrice': '88.28000000', 'unRealizedProfit': '31.84400000', 'liquidationPrice': '0', 'isolatedMargin': '0', 'notional': '291.32400000', 'marginAsset': 'USDT', 'isolatedWallet': '0', 'initialMargin': '29.13240000', 'maintMargin': '1.89360600', 'positionInitialMargin': '29.13240000', 'openOrderInitialMargin': '0', 'adl': 0, 'bidNotional': '0', 'askNotional': '0', 'updateTime': 1732119287099}, {'symbol': 'BTCUSDT', 'positionSide': 'LONG', 'positionAmt': '0.015', 'entryPrice': '79888.804', 'breakEvenPrice': '66580.45818932', 'markPrice': '96489.20000000', 'unRealizedProfit': '249.00594000', 'liquidationPrice': '0', 'isolatedMargin': '0', 'notional': '1447.33800000', 'marginAsset': 'USDT', 'isolatedWallet': '0', 'initialMargin': '289.46760000', 'maintMargin': '5.78935200', 'positionInitialMargin': '289.46760000', 'openOrderInitialMargin': '0', 'adl': 0, 'bidNotional': '0', 'askNotional': '0', 'updateTime': 1732204122751}]
[{'accountAlias': 'AuoCAuuXmYFz', 'asset': 'FDUSD', 'balance': '0.00000000', 'crossWalletBalance': '0.00000000', 'crossUnPnl': '0.00000000', 'availableBalance': '0.00000000', 'maxWithdrawAmount': '0.00000000', 'marginAvailable': True, 'updateTime': 0}, {'accountAlias': 'AuoCAuuXmYFz', 'asset': 'BTC', 'balance': '0.00000000', 'crossWalletBalance': '0.00000000', 'crossUnPnl': '0.00000000', 'availableBalance': '0.00000000', 'maxWithdrawAmount': '0.00000000', 'marginAvailable': True, 'updateTime': 0}, {'accountAlias': 'AuoCAuuXmYFz', 'asset': 'BNB', 'balance': '0.00000000', 'crossWalletBalance': '0.00000000', 'crossUnPnl': '0.00000000', 'availableBalance': '0.00000000', 'maxWithdrawAmount': '0.00000000', 'marginAvailable': True, 'updateTime': 0}, {'accountAlias': 'AuoCAuuXmYFz', 'asset': 'ETH', 'balance': '0.00000000', 'crossWalletBalance': '0.00000000', 'crossUnPnl': '0.00000000', 'availableBalance': '0.00000000', 'maxWithdrawAmount': '0.00000000', 'marginAvailable': True, 'updateTime': 0}, {'accountAlias': 'AuoCAuuXmYFz', 'asset': 'USDT', 'balance': '4517.42752243', 'crossWalletBalance': '4517.42752243', 'crossUnPnl': '280.84994000', 'availableBalance': '4475.45346243', 'maxWithdrawAmount': '4475.45346243', 'marginAvailable': True,

DEMO Spot

{'symbol': 'BTCUSDT', 'orderId': 6441767, 'orderListId': -1, 'clientOrderId': 'x-HNA2TXFJ969f76bc7d0b68c0a2076d', 'transactTime': 1732204206772, 'price': '0.00000000', 'origQty': '0.01000000', 'executedQty': '0.01000000', 'cummulativeQuoteQty': '961.93960000', 'status': 'FILLED', 'timeInForce': 'GTC', 'type': 'MARKET', 'side': 'SELL', 'workingTime': 1732204206772, 'fills': [{'price': '96193.96000000', 'qty': '0.01000000', 'commission': '0.00000000', 'commissionAsset': 'USDT', 'tradeId': 2320696}], 'selfTradePreventionMode': 'EXPIRE_MAKER'}
{'symbol': 'BTCUSDT', 'orderId': 6441767, 'orderListId': -1, 'clientOrderId': 'x-HNA2TXFJ969f76bc7d0b68c0a2076d', 'price': '0.00000000', 'origQty': '0.01000000', 'executedQty': '0.01000000', 'cummulativeQuoteQty': '961.93960000', 'status': 'FILLED', 'timeInForce': 'GTC', 'type': 'MARKET', 'side': 'SELL', 'stopPrice': '0.00000000', 'icebergQty': '0.00000000', 'time': 1732204206772, 'updateTime': 1732204206772, 'isWorking': True, 'workingTime': 1732204206772, 'origQuoteOrderQty': '0.00000000', 'selfTradePreventionMode': 'EXPIRE_MAKER'}
{'asset': 'USDT', 'free': '10854.94831000', 'locked': '0.00000000'}
(.binance) ➜  python-binance git:(all-tests) ✗ 

@carlosmiei carlosmiei merged commit dfa8737 into sammchardy:master Nov 27, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Wish to add a gift card redemption interface The AsyncClient.futures_place_batch_order provide an "1022 INVALID_SIGNATURE" error

3 participants