Skip to content

Latest commit

 

History

History
93 lines (71 loc) · 2.48 KB

File metadata and controls

93 lines (71 loc) · 2.48 KB

Chainlink External Adapter for Twelvedata

Environment Variables

Required? Name Description Options Defaults to
API_KEY API key for Twelvedata
API_ENDPOINT The endpoint for your Twelvedata https://api.twelvedata.com/

Input Parameters

Required? Name Description Options Defaults to
endpoint The endpoint to use closing, price closing

Closing Endpoint

This closing endpoint provides the closing price of the previous day as detailed in Twelvedata documentation.

Input Params

Required? Name Description Options Defaults to
base, from, coin, market The symbol of the currency to query

Sample Input

{
  "id": "1",
  "data": {
    "base": "VXX"
  }
}

Sample Output

{
  "jobRunID": "1",
  "result": 9.975,
  "statusCode": 200,
  "data": {
    "symbol": "VXX",
    "exchange": "CBOE",
    "currency": "USD",
    "datetime": "2021-04-14",
    "close": "9.97500",
    "result": 9.975
  }
}

Price Endpoint

This price endpoint provides the real-time price as detailed in Twelvedata documentation.

Input Params

Required? Name Description Options Defaults to
base, from, coin, market The symbol of the currency to query

Sample Input

{
  "id": "1",
  "data": {
    "base": "VXX",
    "endpoint": "price"
  }
}

Sample Output

{
  "jobRunID": "1",
  "result": 10.0756,
  "statusCode": 200,
  "data": {
    "price": "10.07560",
    "result": 10.0756
  }
}