I have tried the request for a new order in the testnet with the values of the documentation and it works correctly for me. My question is: If I want to long on the BTCUSDT pair, can I set the quantity to be in USDT?
Many times for me this action would be much easier
I hope I have explained myself
Saw your reply from request error with variable in POSTMAN
It should be {“quantity”:4} not {“value”:4}. And I don’t understand why you need to do that if you don’t need to read from env var.
Thanks for you reply. The objective of this test is to change the values in the pre-request script so that the request gets them correctly. I was trying to put the quantity as a key and as a value {{quantity}}. Then in the pre-request use pm.environment.set(“quantity”, 5);. In the request I see:
But If I go to the testnet browser, the order is not execute.
It is not possible to assign to the key environment variables that are modified in the pre-request?
I was looking at the wrong pre-request. It should make the changes that you indicated in the pre-request of the collection.
If I put
Object.assign (paramsObject, {‘quantity’: quantity}); and pm.environment.set (“quantity”, quantity); with the desired amount it works correctly for me.
Now, according to the title of this post I have one question:
I had a question about order creation that I don’t know if it’s possible. When I create an order, I choose the pair and enter the quantity. In this case, I would open a LONG position in the BTCUSDT pair. The amount that I have put is a 5 which in this case means that I am going with 5 btcs. Is there any possibility that that amount instead of being marked in BTCs, is in USDT @MJW ?
That is, if I always have a limit of $ 100 to play, that I put 100 and regardless of the pair I always enter with the total 100.