Skip to content

Commit

Permalink
Merge pull request #32 from Bisonai/feat/add-addapters-aggregators
Browse files Browse the repository at this point in the history
Add adapters & aggregators for MBX/KRW, KSP/KRW, BORA/KRW and WEMIX/USDT
  • Loading branch information
nick-bisonai authored Nov 2, 2023
2 parents a60e8b0 + 795efe1 commit aaf4215
Show file tree
Hide file tree
Showing 10 changed files with 479 additions and 213 deletions.
220 changes: 114 additions & 106 deletions HISTORY.md

Large diffs are not rendered by default.

222 changes: 115 additions & 107 deletions README.md

Large diffs are not rendered by default.

63 changes: 63 additions & 0 deletions adapter/bora-krw.adapter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
{
"adapterHash": "0xf6c3a6a1f072e5e32ea26bf7f588522d6f39ed16dfd1e7830b1828452a0c43f0",
"name": "BORA-KRW",
"decimals": 8,
"feeds": [
{
"name": "Coinone-BORA-KRW",
"definition": {
"url": "https://api.coinone.co.kr/public/v2/ticker_new/KRW/BORA",
"headers": { "Content-Type": "application/json" },
"method": "GET",
"reducers": [
{ "function": "PARSE", "args": ["tickers"] },
{ "function": "INDEX", "args": 0 },
{ "function": "PARSE", "args": ["last"] },
{ "function": "POW10", "args": 8 },
{ "function": "ROUND" }
]
}
},
{
"name": "Bithumb-BORA-KRW",
"definition": {
"url": "https://api.bithumb.com/public/ticker/BORA_KRW",
"headers": { "Content-Type": "application/json" },
"method": "GET",
"reducers": [
{ "function": "PARSE", "args": ["data", "closing_price"]},
{ "function": "POW10", "args": 8 },
{ "function": "ROUND" }
]
}
},
{
"name": "Upbit-BORA-KRW",
"definition": {
"url": "https://api.upbit.com/v1/ticker?markets=KRW-BORA",
"headers": { "Content-Type": "application/json" },
"method": "GET",
"reducers": [
{ "function": "INDEX", "args": 0 },
{ "function": "PARSE", "args": ["trade_price"]},
{ "function": "POW10", "args": 8 },
{ "function": "ROUND" }
]
}
},
{
"name": "Korbit-BORA-KRW",
"definition": {
"url": "https://api.korbit.co.kr/v1/ticker/detailed?currency_pair=bora_krw",
"headers": { "Content-Type": "application/json" },
"method": "GET",
"reducers": [
{ "function": "PARSE", "args": ["last"]},
{ "function": "POW10", "args": 8 },
{ "function": "ROUND" }
]
}
}
]
}

36 changes: 36 additions & 0 deletions adapter/ksp-krw.adapter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
{
"adapterHash": "0xbc6e5d9102a9e78e8ff1b9c0b1ba77b4eff3a1f01f06603839af973d3af81072",
"name": "KSP-KRW",
"decimals": 8,
"feeds": [
{
"name": "Coinone-KSP-KRW",
"definition": {
"url": "https://api.coinone.co.kr/public/v2/ticker_new/KRW/KSP",
"headers": { "Content-Type": "application/json" },
"method": "GET",
"reducers": [
{ "function": "PARSE", "args": ["tickers"] },
{ "function": "INDEX", "args": 0 },
{ "function": "PARSE", "args": ["last"] },
{ "function": "POW10", "args": 8 },
{ "function": "ROUND" }
]
}
},
{
"name": "Korbit-KSP-KRW",
"definition": {
"url": "https://api.korbit.co.kr/v1/ticker/detailed?currency_pair=ksp_krw",
"headers": { "Content-Type": "application/json" },
"method": "GET",
"reducers": [
{ "function": "PARSE", "args": ["last"]},
{ "function": "POW10", "args": 8 },
{ "function": "ROUND" }
]
}
}
]
}

21 changes: 21 additions & 0 deletions adapter/mbx-krw.adapter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"adapterHash": "0x2706c1f4d9efd8dcb4ef51c4d89f0b1dd81fe6bbbd721de20d853a1679ce852f",
"name": "MBX-KRW",
"decimals": 8,
"feeds": [
{
"name": "Bithumb-MBX-KRW",
"definition": {
"url": "https://api.bithumb.com/public/ticker/MBX_KRW",
"headers": { "Content-Type": "application/json" },
"method": "GET",
"reducers": [
{ "function": "PARSE", "args": ["data", "closing_price"]},
{ "function": "POW10", "args": 8 },
{ "function": "ROUND" }
]
}
}
]
}

91 changes: 91 additions & 0 deletions adapter/wemix-usdt.adapter.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
{
"adapterHash": "0x64fa89f33bdaa0a908aad6218e7eeff04b9229533c176e8e9cf68eeae0ff2869",
"name": "WEMIX-USDT",
"decimals": 8,
"feeds": [
{
"name": "Bybit-WEMIX-USDT",
"definition": {
"url": "https://api.bybit.com/v5/market/tickers?category=spot&symbol=WEMIXUSDT",
"headers": { "Content-Type": "application/json" },
"method": "GET",
"reducers": [
{ "function": "PARSE", "args": ["result", "list"] },
{ "function": "INDEX", "args": 0 },
{ "function": "PARSE", "args": ["lastPrice"] },
{ "function": "POW10", "args": 8 },
{ "function": "ROUND" }
]
}
},
{
"name": "Kucoin-WEMIX-USDT",
"definition": {
"url": "https://api.kucoin.com/api/v1/market/orderbook/level1?symbol=WEMIX-USDT",
"headers": { "Content-Type": "application/json" },
"method": "GET",
"reducers": [
{ "function": "PARSE", "args": ["data", "price"] },
{ "function": "POW10", "args": 8 },
{ "function": "ROUND" }
]
}
},
{
"name": "Crypto-WEMIX-USDT",
"definition": {
"url": "https://api.crypto.com/v2/public/get-ticker?instrument_name=WEMIX_USDT",
"headers": { "Content-Type": "application/json" },
"method": "GET",
"reducers": [
{ "function": "PARSE", "args": ["result", "data"] },
{ "function": "INDEX", "args": 0 },
{ "function": "PARSE", "args": ["a"] },
{ "function": "POW10", "args": 8 },
{ "function": "ROUND" }
]
}
},
{
"name": "Coinbase-WEMIX-USDT",
"definition": {
"url": "https://api.coinbase.com/v2/exchange-rates?currency=WEMIX",
"headers": { "Content-Type": "application/json" },
"method": "GET",
"reducers": [
{ "function": "PARSE", "args": ["data", "rates", "USDT"] },
{ "function": "POW10", "args": 8 },
{ "function": "ROUND" }
]
}
},
{
"name": "Coinex-WEMIX-USDT",
"definition": {
"url": "https://api.coinex.com/v1/market/ticker?market=WEMIXUSDT",
"headers": { "Content-Type": "application/json" },
"method": "GET",
"reducers": [
{ "function": "PARSE", "args": ["data", "ticker", "last"] },
{ "function": "POW10", "args": 8 },
{ "function": "ROUND" }
]
}
},
{
"name": "Gateio-WEMIX-USDT",
"definition": {
"url": "https://api.gateio.ws/api/v4/spot/tickers?currency_pair=WEMIX_USDT",
"headers": { "Content-Type": "application/json" },
"method": "GET",
"reducers": [
{ "function": "INDEX", "args": 0 },
{ "function": "PARSE", "args": ["last"] },
{ "function": "POW10", "args": 8 },
{ "function": "ROUND" }
]
}
}
]
}

10 changes: 10 additions & 0 deletions aggregator/default/bora-krw.aggregator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"aggregatorHash": "0x1d1cb1d532040bdf40f8d9e1818f4781646b79adbeef9ed328490a778a822ba6",
"name": "BORA-KRW",
"address": "",
"heartbeat": 15000,
"threshold": 0.05,
"absoluteThreshold": 0.1,
"adapterHash": "0xf6c3a6a1f072e5e32ea26bf7f588522d6f39ed16dfd1e7830b1828452a0c43f0"
}

9 changes: 9 additions & 0 deletions aggregator/default/ksp-krw.aggregator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"aggregatorHash": "0x19a8f696329f3ad8265e8d90fa51527f506dc734afa70e28713683186f102249",
"name": "KSP-KRW",
"address": "",
"heartbeat": 15000,
"threshold": 0.05,
"absoluteThreshold": 0.1,
"adapterHash": "0xbc6e5d9102a9e78e8ff1b9c0b1ba77b4eff3a1f01f06603839af973d3af81072"
}
10 changes: 10 additions & 0 deletions aggregator/default/mbx-krw.aggregator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"aggregatorHash": "0x2a8edc7872c6e5b0b1f8c79d5606d1d286f7b05dc29bbf1dfd5333d2258e6f6f",
"name": "MBX-KRW",
"address": "",
"heartbeat": 15000,
"threshold": 0.05,
"absoluteThreshold": 0.1,
"adapterHash": "0x2706c1f4d9efd8dcb4ef51c4d89f0b1dd81fe6bbbd721de20d853a1679ce852f"
}

10 changes: 10 additions & 0 deletions aggregator/default/wemix-usdt.aggregator.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"aggregatorHash": "0xe87c49db104f27110170d10b10505220f0436fcdeb98754c076848903943fa89",
"name": "WEMIX-USDT",
"address": "",
"heartbeat": 15000,
"threshold": 0.05,
"absoluteThreshold": 0.1,
"adapterHash": "0x64fa89f33bdaa0a908aad6218e7eeff04b9229533c176e8e9cf68eeae0ff2869"
}

0 comments on commit aaf4215

Please sign in to comment.