def test_newOrder_btcusd_OptionsAuctionOnly(): print(end='\n') print(end='\n') print("########## Executing Negative test suite, with optional parameters ##########") print(" ~~~~~~~~~~ NOTE: Expecting error messages in the results ~~~~~~~~~~") print(end='\n') time.sleep(1) # Nonce can't be repeated and can be increased in one session payloadData = { "request": "", "nonce": "", "client_order_id": "Lila_Test2", "symbol": "btcusd", "amount": "5", "min_amount": "2", "price": "3633.00", "side": "buy", "type": "exchange limit", "options": ["auction-only"], "stop_price": "999.00" } gemini_NewOrderOptionParms, response = gemini_PostAPI_NewOrder_OptionParms(payloadData).newOrder_optionParms() print("Test Result: test_newOrder_btcusd_OptionsAuctionOnly()") print(end='\n') print(gemini_NewOrderOptionParms) assert response.status_code != HTTP_SUCCESS print("Status code = ", response.status_code) print(end='\n')
def test_newOrder_btcusd_stopPrice(): time.sleep(1) # Nonce can't be repeated and can be increased in one session payloadData = { "request": "", "nonce": "", "client_order_id": "Lila_Test1", "symbol": "btcusd", "amount": "5", "min_amount": "2", "price": "3633.00", "side": "buy", "type": "exchange limit", "options": ["maker-or-cancel"], "stop_price": "777.00" } gemini_NewOrderOptionParms, response = gemini_PostAPI_NewOrder_OptionParms(payloadData).newOrder_optionParms() print("Test Result: test_newOrder_btcusd_stopPrice()") print(end='\n') print(gemini_NewOrderOptionParms) print(end='\n')
def test_newOrder_btcusd_OptionsIndicationInterest(): time.sleep(1) # Nonce can't be repeated and can be increased in one session payloadData = { "request": "", "nonce": "", "client_order_id": "Lila_Test2", "symbol": "btcusd", "amount": "5", "min_amount": "2", "price": "3633.00", "side": "buy", "type": "exchange limit", "options": ["indication-of-interest"], "stop_price": "999.00" } gemini_NewOrderOptionParms, response = gemini_PostAPI_NewOrder_OptionParms(payloadData).newOrder_optionParms() print("Test Result: test_newOrder_btcusd_OptionsIndicationInterest()") print(end='\n') print(gemini_NewOrderOptionParms) assert response.status_code != HTTP_SUCCESS print("Status code = ", response.status_code) print(end='\n')
def test_newOrder_btcusd_clientOrderId(): print(end='\n') print(end='\n') print("########## Executing Positive test suite where symbol = btcusd, with optional parameters ##########") print(end='\n') time.sleep(1) # Nonce can't be repeated and can be increased in one session payloadData = { "request": "", "nonce": "", "client_order_id": "Lila_Test1", "symbol": "btcusd", "amount": "5", "min_amount": "2", "price": "3633.00", "side": "buy", "type": "exchange limit", "options": ["maker-or-cancel"], "stop_price": "999.00" } gemini_NewOrderOptionParms, response = gemini_PostAPI_NewOrder_OptionParms(payloadData).newOrder_optionParms() print("Test Result: test_newOrder_btcusd_clientOrderId()") print(end='\n') print(gemini_NewOrderOptionParms) print(end='\n')