trade-mate.io cryptocurrency trading platform with autotrade and copytrade functions.
On the website in Trader's Cabinet you need to generate your secrets for two modes "test" and "prod":
In test you can make integration works, and signals created in this mode wouldn't be available from other channe mode.
key
- looks likechannel_mode
(In lowercase) +channel_id
Ex: prod156secret
- Generate it in channel page
Query of each request should have
nonce : <number>
- monotonically increasing value. Ex:+new Date()
authKey : <string>
- You keyauthSignature : <string>
- Calculated signature
- Query params sorted alphabetically, join keys and values via ":"
- If request has body in POST/PATCH request, then add it (stringify(body)) wrapped with ":"
- If request has not body - "::"
- Append secret
- Use sha256 for resulted string and calculate digest in base64
- queryParams
{ nonce: 14892427427, a: 1, b: 2 }
- body
{ some_body: '2love' }
- Resulted string with body -
a:1:b:2:nonce:14892427427:{"some_body":"2love"}:rSfSzzNA97nNJSgc0aToSw==
- Resulted string without body -
a:1:b:2:nonce:14892427427::rSfSzzNA97nNJSgc0aToSw==
- Use sha256 for resulted string and calculate digest in base64
GET https://trade-mate.io/api/bot/v1/stats?nonce=XXX
Get statistics info for channel
score
- calculated score of the channelrequestsPerMinute
- max requests limit per minuterequestsLastMinute
- number of requests last minutesignalsPerDay
- max signals per daysignalsLastDay
- number of created signals last daymaxActiveSignalsPerFeed
- max active signals per channel- channel limits for
exchanges
andbase_currencies
. in limitRemaining field - 1 means 100%.- At the time when signal is created, the limit on this
exchange
and thebase_currency
is reduced by the amount of volume in the signal; when the signal is closed, the limit volume, involved in the signal, returns to the limit.
{ "exchanges":{ "4":{ "baseCurrencies":{ "BTC":{ "limitRemaining":"0.40" }, "ETH":{ "limitRemaining":"1" } } } } }
- At the time when signal is created, the limit on this
GET https://trade-mate.io/api/bot/v1/exchanges?nonce=XXX
Get list of exchanges
GET https://trade-mate.io/api/bot/v1/symbols?nonce=XXX
Get list of symbols and it's symbolId
- response:
{
4 : {
currency: 'AE',
baseCurrency: 'BTC',
active: true,
rate: '0.00002370'
},
...
}
- Currency pairs should have option
active : true
to be used in signals.
GET https://trade-mate.io/api/bot/v1/signals?nonce=XXX
Get channel signals
Available filters in query:
active<bool>
bought<bool>
performance<str>, valid values : 'gain', 'loss'
currency<bool>
baseCurrency<str>
exchangeId<id>
GET https://trade-mate.io/api/bot/v1/signal?nonce=XXX&signalId=YYY
Get signal with signalId
signalId
in query
POST https://trade-mate.io/api/bot/v1/signal?nonce=XXX
Signal create
Request example into example file, here are details:
Signal is consists of
actions
, this actions has semantics likebuys
,takeProfits
,stopLoss
.
- where:
key
generated by you idaction
,value
-action
.- id - unique key in signal (can be monotonically increasing value)
Fields in body:
buys<hashMap<id, action>> // mandatory, should countain at least one action
takeProfits<hashMap<id, action>> // mandatory, should countain at least one action
stopLoss<action> // optional
waitBuyForSell // optional
- This option means that when the last take profit will be reached, the task will not be closed until all buy orders in the task are placed and partially bought on exchange, stop loss will be activated if at least something was bought in the buy actions in the task.
Mandatory fields in
action
:
amount<number>|<str>
- 0 ~ 1- summary amount of
buys
should be equal to summaryamount
intakeProfits
and instopLoss
,
- summary amount of
type<str>
Fields:
price
- price buy/sell, if specified - it's LIMIT order, if it is not - MARKETthreshold
- threshold price for activationaction
, using like stop price foraction
(STOP MARKET/LIMIT orders)- for
buys
mandatory only iftype
==BuyIfAbove
||BuyIfBelow
- for
takeProfits
иstopLoss
, always mandatory
- for
trailing
- available only fortakeProfits
иstopLoss
- для
stopLoss
ctype == StopLossTrailingSell
this is the relative difference between the stop loss level and the current market price, in fractions of a unit, a positive value - для
takeProfits
сtype == TakeProfitTrailingSell
this is the percentage of trailing, 3% => 0.03
- для
ladder<boolean>
- only forstopLoss
and is mandatory
For buys
- type ==
Buy
- type ==
BuyIfAbove
, mandatorythreshold
- type ==
BuyIfBelow
, mandatorythreshold
For take profits
- type ==
TakeProfitSell
, mandatorythreshold
- type ==
TakeProfitTrailingSell
, mandatorythreshold, trailing
For stop loss
- type ==
StopLossSell
, mandatorythreshold
- type ==
StopLossTrailingSell
, mandatorytrailing
If you make a signal for a channel that supports BitMEX, you should send additional fields:
leverage
: preferred from 1 to 5task_type
:SHORT
||LONG
Example:
{
symbolId: 487,
buys: {
'1': {
price: '0.00000472',
type: 'Buy',
amount: '0.1'
}
},
takeProfits: {
'2': {
amount: '0.05',
threshold: 0.000004956,
type: 'TakeProfitSell'
},
'3': {
amount: '0.05',
threshold: 0.0000051920000000000004,
trailing: 0.02,
type: 'TakeProfitTrailingSell'
}
},
stopLoss: {
amount: '0.1',
type: 'StopLossSell',
threshold: 0.000004484,
ladder: true
}
}
PATCH https://trade-mate.io/api/bot/v1/signal?nonce=XXX&signalId=YYY
Signal update
signalId<str>
inquery
Mandatory fields are:
buys
takeProfits
in
action
should beeditMode
field:
editMode<str>
:'create'
- if you add action'replace'
- if you change some in existing action'remove'
- if you removing action
In buys
, takeProfits
, stopLoss
it is necessary to use only what is subject to change.
POST https://trade-mate.io/api/bot/v1/panic?nonce=XXX&signalId=YYY
Panic Sell/Close signal
signalId
in query
All questions - https://t.me/dobrijvecher