All-in-one node.js cryptocurrency trading bot toolkit API.

Access the same API that powers the Coygo app. The perfect solution for institutions or solo bot developers.
Unified API
Use a single, unified API for every supported exchange. You focus on your strategy, we'll handle the rest.
Your Infrastructure
We provide the downloadable API, you run it on your own infrastructure. Our servers never touch your API keys.
Zero Latency
Connect your machine directly to each exchange for real-time order book, trade, and ticker data. No middleman means no latency.
Derived Data
Access derived calculations using order book data including order book superiority and true cost determination.
Smart Order Routing
Calculate potential smart order router orders using order book data across multiple exchanges to ensure the best rate.
Trading
Submit trades of multiple order types and manage open orders across every supported exchange.
Transfer
Transfer between wallets at different exchanges,  retrieve  deposit addresses, and send to personal wallets, .
Crypto Arbitrage API
Real-time tickers and calculated spreads for any trading pair across multiple exchanges.
Portfolio Tracking
Read balances of all of your exchange wallets along with their USD estimated value using public market data.

How it works

The Coygo API is a node.js library for building cryptocurrency trading bots, but it can do so much more.

The Coygo API connects your machine directly to each exchange for zero-latency access, Coygo's servers don't act as a middleman. That means that order book data is stored in memory on your machine, and all trades and API interactions are submitted directly from your device.

You import the library into your node.js codebase and use it however you see fit for developing systems such as trading bots, dashboards, real-time analytics systems, and more. You decide where and how to store your API keys, our servers never touch your API keys or your accounts.

Why the Coygo API?

The Coygo API provides a standardized way to interact with every supported exchange, you get to focus on what's important and we simplify the rest. No middelman means no latency, and all data is available with real-time websockets when possible. As is standard with all Coygo products, our server's never have access to your API keys or accounts.

Code Examples

import { Coygo, SUPPORTED_EXCHANGE_IDS } from 'coygo-api';
// set up coygo instance and each exchange
const coygo = new Coygo({
  apiKey: '<coygo api key>',
  exchanges: [
    {
      exchangeId: SUPPORTED_EXCHANGE_IDS.KRAKEN,
      apikey: '<kraken api key>',
      apiSecret: '<kraken api secret>'
    },
    {
      exchangeId: SUPPORTED_EXCHANGE_IDS.COINBASE_PRO,
      apikey: '<coinbase pro api key>',
      apiSecret: '<coinbase pro api secret>',
      apiPassphrase: '<coinbase pro api passphrase>'
    },
    {
      exchangeId: SUPPORTED_EXCHANGE_IDS.BITTREX,
      apikey: '<bittrex api key>',
      apiSecret: '<bittrex api secret>'
    }
  ]
});
// retrieve an exchange client
const krakenClient = coygo.getClient({ 
  exchangeId: SUPPORTED_EXCHANGE_IDS.KRAKEN
});
const krakenBalances = await krakenClient.getBalance();
// krakenBalaces example
[
  {
    "name": "Bitcoin",
    "symbol": "BTC",              // symbols are normalized (XBT => BTC)
    "exchangeId": "Kraken",
    "amount": 0.00275173,
    "type": "free"
  },
  {
    "name": "Litecoin",
    "symbol": "LTC",
    "exchangeId": "Kraken",
    "amount": 1.78747888,
    "type": "free"
  },
  {
    "name": "Ethereum",
    "symbol": "ETH",
    "exchangeId": "Kraken",
    "amount": 0.09979875,
    "type": "free"
  }
]
const tradeResult = await krakenClient.tradeCurrenciesLimitOrderBuy({
  buySymbol: 'BTC',
  sellSymbol: 'ETH',
  buyAmount: 0.5,
  limitOrderRate: 0.02158
});
// tradeResult example
{
  exchangeTransactionId: '<id of transaction from Kraken>',
  fees: [
    type: 'Exchange',
    cost: <fee amount>,
    symbol: '<fee symbol>'
  ],
  buyTotal: 0.1               // amount that was filled immediately
}
const krakenOpenOrders = await krakenClient.getOpenOrders();
// krakenOpenOrders example
[
  {
    exchangeId: 'Kraken',
    exchangeTransactionId: '<id of transaction from Kraken>',
    tradePair: 'ETH/BTC',
    rate: 0.02158,
    amount: 0.5,
    remaining: 0.4,
    filled: 0.1,
    status: 'OPEN',
    timestamp: 1574288203153,
    description: 'Order for 0.5 at rate 0.02158 on market ETH/BTC'
  }
]
// get exchange client for sending and receiving exchanges
const krakenClient = coygo.getClient({ 
  exchangeId: SUPPORTED_EXCHANGE_IDS.KRAKEN
});
const bittrexClient = coygo.getClient({
  exchangeId: SUPPORTED_EXCHANGE_IDS.COINBASE_PRO
});
// get deposit address
const bittrexDepositAddressResult = await bittrexClient.getDepositWalletAddress({
  symbol: 'LTC'
});
// submit transfer
const exchangeTransferId = await krakenClient.sendFunds({
  symbol: 'LTC',
  amount: 5,
  destinationWalletAddress: bittrexDepositAddressResult.address
});
krakenClient.registerOrderBookListener({
  baseSymbol: 'BTC',
  quoteSymbol: 'USD',
  callback: (orderBook) => {
    // receives updates in real-time directly from the exchange
    console.log(orderBook);
  }
});
// callback orderBook example
{
  last: 8081.1,
  asks: {
    '8083.1': 0.65,
    '8084': 0.25,
    '8085.2': 1.4,
    ...
  },
  bids: {
    '8080.5': 2.42,
    '8078': 0.31,
    '8077.8': 0.9,
    ...
  }
}
krakenClient.registerTickerListener({
  baseSymbol: 'BTC',
  quoteSymbol: 'USD',
  callback: (ticker) => {
    // receives updates in real-time directly from the exchange
    console.log(ticker);
  }
});
// callback ticker example
{
  exchangeId: 'Kraken',
  last: 8081.1,
  baseSymbol: 'BTC',
  quoteSymbol: 'USD'
}
krakenClient.registerTradeStreamListener({
  baseSymbol: 'BTC',
  quoteSymbol: 'USD',
  callback: (trades) => {
    // receives updates in real-time from exchange
    // initial payload contains recent trading history for this market
    console.log(trades);
  }
});
// callback trades example
[
  {
    exchangeId: 'Kraken',
    exchangeTradeId: '<id on Kraken>',
    baseSymbol: 'BTC',
    quoteSymbol: 'USD',
  },
  ....
]

Sign up now for early access

Coygo is a United States company based in San Diego, CA.