-
Notifications
You must be signed in to change notification settings - Fork 324
Adds DBAG EA #4009
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mohamed-mehany
wants to merge
15
commits into
main
Choose a base branch
from
deutsche-boerse
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Adds DBAG EA #4009
Changes from all commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
691934b
Adds initial draft of the DBAG EA
mohamed-mehany 7073224
Refactoring
mohamed-mehany 9a66638
handle ERR_INVALID_ARG_TYPE error
akuzni2 0078fbc
Adds unit tests
mohamed-mehany b682ce9
Tests
mohamed-mehany 0df627d
Decimal js
mohamed-mehany 709c37a
Adds tests and market in params
mohamed-mehany d0b5bcc
Changeset
mohamed-mehany 7d4a731
Minor edits
mohamed-mehany 16c1eac
Fix tests
mohamed-mehany e8dbfc9
Fix test
mohamed-mehany af78680
Fix tests
mohamed-mehany 90564fa
Address comments
mohamed-mehany 15610e0
Remove debugging
mohamed-mehany c6ef4e7
nits
mohamed-mehany File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@chainlink/deutsche-boerse-adapter': major | ||
--- | ||
|
||
Adds first release of the Deutsche Boerse EA |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Empty file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Chainlink External Adapter for deutsche-boerse | ||
|
||
This README will be generated automatically when code is merged to `main`. If you would like to generate a preview of the README, please run `yarn generate:readme deutsche-boerse`. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: v2 | ||
plugins: | ||
- remote: buf.build/bufbuild/es | ||
out: src/gen | ||
opt: | ||
- target=ts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
version: v2 | ||
modules: | ||
- path: src/proto |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"name": "@chainlink/deutsche-boerse-adapter", | ||
"version": "0.0.0", | ||
"description": "Chainlink deutsche-boerse adapter.", | ||
"keywords": [ | ||
"Chainlink", | ||
"LINK", | ||
"blockchain", | ||
"oracle", | ||
"deutsche-boerse" | ||
], | ||
"main": "dist/index.js", | ||
"types": "dist/index.d.ts", | ||
"files": [ | ||
"dist" | ||
], | ||
"repository": { | ||
"url": "https://github.com/smartcontractkit/external-adapters-js", | ||
"type": "git" | ||
}, | ||
"license": "MIT", | ||
"scripts": { | ||
"clean": "rm -rf dist src/gen && rm -f tsconfig.tsbuildinfo", | ||
"prepack": "yarn build", | ||
"prebuild": "yarn buf generate", | ||
"build": "tsc -b", | ||
"server": "node -e 'require(\"./index.js\").server()'", | ||
"server:dist": "node -e 'require(\"./dist/index.js\").server()'", | ||
"start": "yarn server:dist" | ||
}, | ||
"devDependencies": { | ||
"@bufbuild/buf": "^1.57.0", | ||
"@sinonjs/fake-timers": "9.1.2", | ||
"@types/jest": "^29.5.14", | ||
"@types/node": "22.14.1", | ||
"@types/sinonjs__fake-timers": "8.1.5", | ||
"@types/ws": "^8", | ||
"nock": "13.5.6", | ||
"typescript": "5.8.3" | ||
}, | ||
"dependencies": { | ||
"@bufbuild/protobuf": "^2.7.0", | ||
"@chainlink/external-adapter-framework": "2.7.0", | ||
"decimal.js": "10.5.0", | ||
"tslib": "2.4.1", | ||
"ws": "^8.18.3" | ||
} | ||
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import { AdapterConfig } from '@chainlink/external-adapter-framework/config' | ||
|
||
export const config = new AdapterConfig({ | ||
API_KEY: { | ||
description: 'An API key for Data Provider', | ||
type: 'string', | ||
required: true, | ||
sensitive: true, | ||
}, | ||
WS_API_ENDPOINT: { | ||
description: 'WS endpoint for Data Provider', | ||
type: 'string', | ||
default: 'wss://md.deutsche-boerse.com', | ||
}, | ||
}) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { endpoint as lwba } from './lwba' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
import { AdapterEndpoint } from '@chainlink/external-adapter-framework/adapter' | ||
import { InputParameters } from '@chainlink/external-adapter-framework/validation' | ||
import { config } from '../config' | ||
import { wsTransport } from '../transport/lwba' | ||
|
||
export const MARKETS = ['md-xetraetfetp'] as const | ||
export type Market = (typeof MARKETS)[number] | ||
|
||
export const inputParameters = new InputParameters( | ||
{ | ||
isin: { | ||
aliases: ['instrument', 'ISIN'], | ||
required: true, | ||
type: 'string', | ||
description: 'The ISIN identifier of the instrument to query', | ||
}, | ||
market: { | ||
aliases: ['stream'], | ||
required: true, | ||
type: 'string', | ||
description: 'The market identifier of the stream to query', | ||
options: [...MARKETS], | ||
}, | ||
}, | ||
[ | ||
{ | ||
market: 'md-xetraetfetp', | ||
isin: 'IE00B53L3W79', | ||
}, | ||
], | ||
) | ||
|
||
interface LwbaLatestPriceResponse { | ||
Result: number | null | ||
Data: { | ||
mid: number | null | ||
bid: number | null | ||
ask: number | null | ||
latestPrice: number | null | ||
quoteProviderIndicatedTimeUnixMs: number | null | ||
tradeProviderIndicatedTimeUnixMs: number | null | ||
} | ||
} | ||
|
||
export type BaseEndpointTypes = { | ||
Parameters: typeof inputParameters.definition | ||
Response: LwbaLatestPriceResponse | ||
Settings: typeof config.settings | ||
} | ||
|
||
export const endpoint = new AdapterEndpoint({ | ||
name: 'lwba', | ||
aliases: [], | ||
transport: wsTransport, | ||
inputParameters, | ||
}) |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.