Chainlink Developers

Welcome to the Chainlink documentation site. You'll find comprehensive guides and documentation to help you start working with Chainlink as quickly as possible, as well as support if you get stuck. Click here for an introductory walkthrough on how to create a Chainlink request on the Ropsten test network!

Building on Chainlink? Click here to get started!

Get Started

Kaiko Chainlink (Testnet)

This Chainlink has a dedicated connection to Kaiko's API. Kaiko is the leading provider of institutional grade cryptocurrency market data.

This Chainlink currently supports recent direct exchange rates, recent trade aggregates, and recent trades for all supported exchanges and instruments.

Steps for using this oracle

Chainlink Network Details

You will need to use the following LINK token address, oracle address, and Job ID in order to create the Chainlink request.

Create your Chainlinked contract

Import Chainlinked.sol into your contract so you can inherit the Chainlinked behavior.

pragma solidity ^0.4.24;

import "chainlink/contracts/ChainlinkClient.sol";

contract KaikoChainlink is ChainlinkClient {

  uint256 oraclePayment;

  constructor(uint256 _oraclePayment) public {
    oraclePayment = _oraclePayment;
  // Additional functions here:


Request Parameters

Parameters are required unless specifically marked as optional:

  • region: (string) us or eu.
  • endpoint: (string) URI excluding domain and query string.
  • params: (string, optional) Query string
  • times: (int) See Multiply adapter
  • copyPath: (string or array of strings) See Copy adapter

Refer to the Kaiko Market Data API documentation for how to construct endpoints and params. For information on available exchanges and instruments, refer to the Kaiko Reference Data API documentation or Instrument Explorer.

Chainlink Examples

We have provided a full example Chainlinked Contract to request the most recent spot price for a given asset pair.

This example shows how to create the request for the Chainlink node:

function requestSpotPrice
  address _oracle,
  bytes32 _jobId
  Chainlink.Request memory req = buildChainlinkRequest(_jobId, this, this.fulfill.selector);
  req.add("region", "us");
  req.add("endpoint", "v1/data/trades.v1/spot_direct_exchange_rate/btc/usdt/recent");
  req.add("params", "interval=1m&limit=2");
  req.addInt("times", 100);
  req.add("copyPath", "data.-1.price");
  sendChainlinkRequestTo(_oracle, req, oraclePayment);

Here is an example of the fulfill method:

uint256 public currentPrice;

function fulfill(bytes32 _requestId, uint256 _price)
  currentPrice = _price;

Updated 7 days ago

Kaiko Chainlink (Testnet)

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.