Sending Signals - API: Endpoint GET/POST

Sending Signals - API: Endpoint GET/POST

For Service Providers

API

Endpoint GET/POST


Endpoint GET -
You need to add the signal parameters to the URL,
If you enter this into your browser address bar, it will send a signal automatically. The GET method is less secure than the POST because the parameters (including your secret key) are in the URL visible to everybody that can intercept it.

Endpoint POST - This works exactly as the GET method above, only the parameters will be sent as post data instead of URL parameters.

 


  1. 3 ways to send your Signals to Zignaly

  2. Develop your Syntax

    1. Key

    2. Type

    3. Mandatory parameters

    4. Optional Parameters

  3. Video


 

2. Develop your Syntax

    • Endpoint GET

The endpoint URL is: 

https://zignaly.com/api/signals.php?

Using the GET method, you need to add the parameters to the URL, as in the following example:

https://zignaly.com/api/signals.php?key=YOUR_PROVIDER_KEY&signalId=YOUR_UNIQUE_SIGNAL_ID&pair=BTCUSDT&type=entry&exchange=binance&positionSizePercentage=10
You will need to enter your provider key, and give this signal a unique ID

*Visiting the previous URL (with your own provider's key), it will send a signal automatically, so be careful where you copy it.

If you enter this into your browser address bar, it will send a signal automatically. Example:

In this example the entry signal I entered opened my position, I can now view it on Zignaly in my open positions:

    • Endpoint POST

This works exactly as the GET method above, only the parameters will be sent as post data instead of URL parameters. The URL is the same:

https://zignaly.com/api/signals.php

The parameters will go as JSON example:

{"key":"YOURSECRETKEY","exchange":"binance","type":"entry","market":"QTUMBTC","positionSizePercentage":"10"}

The endpoint doesn't return anything visible, just the HTTP status code. If you get 200, then everything is OK, if not, check the HTTP code error


 

To build your Signals Syntax, we will establish the four components:

      1. First, you need to have your Key
      2. Which type of Signal
      3. Mandatory parameters
      4. Optional Parameters

2.1. Key

The key is what connects the signal with your service, to get your key, go to your provider page, In the edit tab you will find your key in the SignalURL (key=xxxx)

      • It's important that you don't share this key with anybody because it controls your service (sending buy/sell orders to the exchange)

2.2 Type

Every signal you send will need to specify the type of signal and enter this into your syntax:

type=entry
type=exit

As well as other options:
type=stop
type-start
type=disableMarket
type=enableMarket
type=panicSell
type=update
type=cancelEntry
type=reverse

*For more details on each of these please select click on the specific type to view the definition and conditions in our Signals article.

2.3. Mandatory Fields

On each type, you will see the mandatory fields applied to this type of Signal. (Check in the ‘signals’ article what are the mandatory fields for each Type of Signal.)


Now we can build our Syntax off of this information:
(Key,Type, plus mandatory fields> exchange, pair, positionSizePercentage & signalId)
GET method - Example only:

key=YOURSECRETKEY&type=entry&exchange=binance&pair=ethbtc&positionSizePercentage=10&SignalId=123

 

positionSizePercentage The percentage is from the configured value in the allocated balance setting. It has to be a value between 1 and 100. As always if the resulting position size is below the minimum allowed by the exchange, it will fail.
signalId An ID that you can use to identify the positions that have been opened from a specific buy signal. Later, if you want to act against those positions (selling, rebuying), you need to use the same ID.

 

2.4 Aditional Parameters

If you would like to add additional parameters to this signal please review the other options under ‘Parameters’ on our Signals documentation. Be sure these parameters are permissible with the type of signal you are using.
Example:

orderType=market
Other parameter options may include: stopLossPercentage, takeProfitPercentage, takeProfitAmountPercentage

If trading futures, you will need to add 3 required parameters to this entry signal:
  • exchangeAccountType (This is required to specify futures)
  • side (You must use this field to identify a Long or Short position)
  • leverage (Enter your leverage amount, if not using enter 1)


Now let assemble our entry signal to have our final completed Syntax (Example only):

For Spot

https://zignaly.com/api/signals.php?key=YOURSECRETKEY&type=entry&exchange=binance&pair=ethbtc&orderType=market&positionSizePercentage=10&signalId=123

 

For Futures

https://zignaly.com/api/signals.php?key=YOURSECRETKEY&type=entry&exchange=binance

&exchangeAccountType=futures&pair=ethbtc&orderType=market&side=long&leverage=2

&positionSizePercentage=10&signalId=123

 


Here is an example of an entry Syntax you would insert into your browser address bar, it will send a signal automatically.

3. Video

Take a look at this quick video to see how simple this is:

Was this article helpful?
3 out of 4 found this helpful
Have more questions? Submit a request

Comments

0 comments

Please sign in to leave a comment.