Skip to content

Conversation

chray-zhang
Copy link
Collaborator

@chray-zhang chray-zhang commented Oct 16, 2025

Closes https://smartcontract-it.atlassian.net/browse/OPDATA-4247

Description

  • Split the DBAG EA into 2 separate endpoints
  • Added bidSz and askSz
  • Changed Cache key to be {market}-{instrument}
  • Use avgPx for lastPx

Steps to Test

chrayzhang@MB-C3H04RT9WT ~ % curl -X POST http://localhost:8080 \
  -H "Content-Type: application/json" \
  -d '{
    "id": "1",
    "data": {
      "endpoint" : "lwba",
      "instrument": "DE0007164600",
      "market": "md-tradegate"
    }
  }' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   514  100   380  100   134  82501  29092 --:--:-- --:--:-- --:--:--  125k
{
  "result": null,
  "data": {
    "bid": 232.1,
    "ask": 232.45,
    "mid": 232.275,
    "bidSize": 73,
    "askSize": 50
  },
  "timestamps": {
    "providerDataStreamEstablishedUnixMs": 1760718942434,
    "providerDataReceivedUnixMs": 1760718946857,
    "providerIndicatedTimeUnixMs": 1760718946665
  },
  "statusCode": 200,
  "meta": {
    "adapterName": "DEUTSCHE_BOERSE",
    "metrics": {
      "feedId": "{\"isin\":\"de0007164600\",\"market\":\"md-tradegate\"}"
    }
  }
}
chrayzhang@MB-C3H04RT9WT ~ % curl -X POST http://localhost:8080 \
  -H "Content-Type: application/json" \
  -d '{
    "id": "1",
    "data": {
      "endpoint" : "price",
      "instrument": "DE0007164600",
      "market": "md-tradegate"
    }
  }' | jq
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100   471  100   336  100   135  28275  11360 --:--:-- --:--:-- --:--:-- 42818
{
  "result": null,
  "data": {
    "latestPrice": 230.65
  },
  "timestamps": {
    "providerDataStreamEstablishedUnixMs": 1760719865408,
    "providerDataReceivedUnixMs": 1760719875108,
    "providerIndicatedTimeUnixMs": 1760702571375
  },
  "statusCode": 200,
  "meta": {
    "adapterName": "DEUTSCHE_BOERSE",
    "metrics": {
      "feedId": "{\"isin\":\"de0007164600\",\"market\":\"md-tradegate\"}"
    }
  }
}

Quality Assurance

  • [X ] If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant infra-k8s configuration file.
  • [X ] If a new adapter was made, or an existing one was modified so that its environment variables have changed, update the relevant adapter-secrets configuration file or update the soak testing blacklist.
  • [X ] If a new adapter was made, or a new endpoint was added, update the test-payload.json file with relevant requests.
  • [X ] The branch naming follows git flow (feature/x, chore/x, release/x, hotfix/x, fix/x) or is created from Jira.
  • [ X] This is related to a maximum of one Jira story or GitHub issue.
  • [ X] Types are safe (avoid TypeScript/TSLint features like any and disable, instead use more specific types).
  • [ X] All code changes have 100% unit and integration test coverage. If testing is not applicable or too difficult to justify doing, the reasoning should be documented explicitly in the PR.

Copy link

changeset-bot bot commented Oct 16, 2025

🦋 Changeset detected

Latest commit: 668c6ef

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@chainlink/deutsche-boerse-adapter Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Collaborator

@mohamed-mehany mohamed-mehany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few changes proposed and can we please fix the integration tests to run so that we can early fail any issues?

@chray-zhang chray-zhang marked this pull request as ready for review October 17, 2025 16:52
Copy link
Collaborator

@mohamed-mehany mohamed-mehany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good now, just one last nitpick and can you please rebase to make sure we have the latest from DBAG?

mohamed-mehany
mohamed-mehany previously approved these changes Oct 17, 2025
Copy link
Collaborator

@mohamed-mehany mohamed-mehany left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few nits but not blockers.
Thank you!

mohamed-mehany
mohamed-mehany previously approved these changes Oct 17, 2025
logger.debug({ isin, market }, 'Awaiting complete quote before emitting')
const responseData = extractData(quote, providerTime)
if (!responseData) {
logger.debug({ isin, market }, 'Awaiting complete data before emitting')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This log as well

mxiao-cll
mxiao-cll previously approved these changes Oct 18, 2025
@chray-zhang chray-zhang dismissed stale reviews from mxiao-cll and mohamed-mehany via 668c6ef October 18, 2025 00:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants