Here you will find different ways to use Postman, along with instructions on how to install Binance Collections!

This article can also help you enable or disable 'Hedge Mode'. We explain where to enter your APIs, troubleshooting tips and how to open trades directly from Postman!

In this article:


How To Install Postman From Scratch And Add Binance Collections

First of all, we must download the desktop application at:

https://www.postman.com/

Once installed, we must define specific parameters to make it work correctly. From this screen, we must select 'POST' and include the following URL:

https://test.zignaly.com/api/trading_signals.php

The second parameter to configure is in the 'Headers' tab. Here we must complete the 'KEY' column with 'HTTP_CONTENT_TYPE', and then the 'VALUE' column with 'application/json':

The third and last parameter to configure is in the 'Body' tab. Here you must select 'Raw' and the 'JSON' format. Once complete, you can include the Syntax and start testing the signals:

{"key":"XXXXXXXXXXXXX",

"type":"entry",

"exchange":"zignaly",

"orderType":"market",

"pair":"bnbusdt",

"positionSize":"10",

"side":"long/short",

"leverage":"1",

"signalId":"TEST1"}

Where can you find “YOURKEY” parameter?

On the PS1 interface, you can find it on your connected Exchange in the settings tab:

After sending the signal, the code should appear as 'Status: 200 OK'. This means that the signal was sent and received correctly:

How to set up Postman Library - Binance Collection

Please follow these steps in Github: https://github.com/binance/binance-api-postman

Download the ZIP file and extract it, preferably to your desktop.

Next, go to Postman and click on 'Import'. Select the folder and attach the downloaded file (unzipped).


We already have the entire Binance library in our Postman!

Where To Place The API

Next, we want to add the APIs to our Binance library!

For example, let's select 'Binance perpetual futures API' - 'Market' - 'Check Server Time':

1. On the top right, expand the dropdown or type 'No Environment', and click on the option 'Binance Perpetual Futures':

2. Click on the eye icon beside the selector. This will open a window where you can introduce your API Keys (Key and Secret):

Once the APIs are added, we can test if it is connected properly:
'Verify that the API is working correctly'

What Can Be Done With This?

Activate or deactivate Hedge-Mode.

In this section, we will see how to activate or deactivate the Hedge Mode of your API! First, we must verify that we connected our APIs correctly:

'Where to place the API'

Here we have to enter the section 'Binance perpetual futures API' - 'Trade' - 'Change Position Mode (TRADE)':

We will write 'True' in the space provided and check 'Send'.

If everything is correct, we should receive status '200 OK'.

This confirmation would be enough, but if we want to verify that the change has been made correctly, we can see it here:

'Binance perpetual futures API' - 'Trade' - 'Get Current Position Mode (USER_DATA)', and click on the 'Send' option.

We must receive 'Status 200 OK' and the message: 'dualSidePosition': true.

We may now be able to operate in Hedge Mode without any problem!

If we want to deactivate it, we only have to write the word 'false' where it is indicated in the image and press the 'send' key:

To verify it, we can follow the same steps as before:

We must receive 'Status 200 OK' and this message: 'dualSidePosition': false.

Troubleshooting:

1. Postman is returning 'msg': 'Signature for this request is not valid.'

You have missed placing the parameter 'true/false' 'dualSidePosition' in the request:

2. Assume that you're having problems with Postman, such as enabling or disabling Hedge-Mode. You have modified some parameters, and now you don't know how to fix them.

The quickest solution is to reset the entire library and the API key configuration.

How is this done?

You have to delete the Workspace where you imported the Binance Collection library.

Go and click on the name of your Workspace and then go to the settings:

Now, select "Delete Workspace" and follow the steps to delete it:


Important:

This will remove all the settings you have made to your API Key from Postman.

Once eliminated, we start from scratch.

Go and create another workspace, clicking on "My workspace" - "Create Workspace":

Enter the name and click ‘Create’:

Now you need to add the Binance collections and your API Keys one more time:

This will bring the Binance collection library in Postman back to its default parameters and you can start over.

Trade using API Keys in Postman

Let's open an actual order in Binance!

First, you need to have the Binance library in your workspace and have the API Keys introduced. All of the steps are listed here:

'How To Install Postman and Add Binance Collections'

'Where To Place The API'

To open a futures position, we need to select under 'Binance Perpetual Futures', the folder 'Order', and then 'New Order'. This will open a list of parameters on the right side to be introduced as a symbol, price, ect:

We need to determine which parameters we will use for our position. In this case, we're using the following:

symbol=ROSEUSDT

side=BUY

type=LIMIT

timeInForce=GTC

quantity=180

price=0.028 (current price: 0.03634 USDT)

For testing purposes, it's better to use 'limit' and 'price' under the current price with some margin.

(It is necessary to uncheck all the parameters that we are not using)

To send the order, click on 'send'. If placed successfully, you will see information about the order at the bottom:

Then if we go to our service, we will be able to see the order placed:

In another example, the order has already been executed and will appear in the 'Contracts' section:

Verify that the API is working correctly

We will make a test call to get the Server Time.

To do it, you need to have the 'Binance Perpetual Future API' Library added to your collection. Next, we need to open the Check Server Time Endpoint.

If you receive this error, perhaps the API Keys were never introduced, or you didn't select 'The Environment'. Let's follow the next steps: 'Where to place the API'

Once you have them, let's return to the check server endpoint and press 'Send'. This time it should show a response below with the server time in Unix format and 'Status: 200 OK'!

Did this answer your question?