Skip to content
JavaScript
Branch: master
Clone or download
Latest commit 252c6a1 Jul 17, 2019
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitattributes Initial commit Jul 15, 2019
README.md Update README.md Jul 15, 2019
package.json
socket_test.js

README.md

Trade Tosser Sockets

Trade Tosser Sockets uses socket-io to provide our event signals that are derived from segments of complex models in real-time.

Requirements!

Installation

TT Sockets requires socket-io.

Usage

Javascript example:

   var socket = io('https://tradetosser.com:5000?token=YOUR_API_KEY');
     // Connection succeeded
socket.on('connect', () => {
	
});
  // Connection lost
socket.on('disconnect', () => {
 
});

  socket.on('EURUSD', function(data) {
    if(data.text == "CLOSE_DC"){ //If our data provider goes offline
    
    }else if(data.text == "CLOSE"){ //If the trade we are working with closes
    
    }else if(data.text == "OPEN"){ //If the trade signal is a new trade
    
     }
   })
Replace with pair you want to listen to  = Pair code written in bold
  • EURUSD Euro/US Dollar
  • BTCUSD Bitcoin/US Dollar
  • USDJPY US Dollar/Japanese Yen
  • GBPUSD British Pound/US Dollar
  • AUDUSD Australian Dollar/US Dollar
  • USDCAD US Dollar/Canadian Dollar
  • USDCHF US Dollar/Swiss Franc
  • EURGBP Euro/British Pound
  • NZDUSD New Zealand Dollar/US Dollar
  • AUDJPY Australian Dollar/Japanese Yen
  • GBPJPY British Pound/Japanese Yen
  • GBPAUD British Pound/Australian Dollar
  • AUDNZD Australian Dollar/New Zealand Dollar
  • USDMXN US Dollar/Mexican Peso
  • ETHUSD Ethereum/US Dollar
  • EURCAD Euro/Canadian Dollar
  • EURJPY Euro/Japanese Yen
  • USDTRY US Dollar/Turkish Lira
  • USDZAR US Dollar/South African Rand
  • XAUUSD Gold/US Dollar

Data object

  • pair | Pair of the trade
  • type | If it's SHORT or LONG
  • price | current price of the trade [start price if we are opening, close price if the trade is closing]
  • unitSize | unit size bought from our algorithm
  • timestamp
  • stopPrice | Stop price for the trade
  • comment | Remarks for the trade
You can’t perform that action at this time.