Skip to content

Conversation

markhoangcll
Copy link

@markhoangcll markhoangcll commented Sep 15, 2025

Closes OPDATA-4029 / CM-1099

Description

LiveArt External Adapter (EA) to fetch art nav_per_share numerical data.
......

Changes

  • Created EA
  • Wrote integration and unit tests
  • Generated a changeset

Steps to Test

From root directory

  1. yarn setup
  2. export adapter=liveart
  3. yarn test $adapter/test

Quality Assurance

  • 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.
  • 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.
  • If a new adapter was made, or a new endpoint was added, update the test-payload.json file with relevant requests.
  • The branch naming follows git flow (feature/x, chore/x, release/x, hotfix/x, fix/x) or is created from Jira.
  • This is related to a maximum of one Jira story or GitHub issue.
  • Types are safe (avoid TypeScript/TSLint features like any and disable, instead use more specific types).
  • 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 Sep 15, 2025

🦋 Changeset detected

Latest commit: e2c52cb

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

This PR includes changesets to release 1 package
Name Type
@chainlink/liveart-external-adapter Major

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

@markhoangcll markhoangcll marked this pull request as draft September 15, 2025 09:33
@markhoangcll markhoangcll marked this pull request as ready for review September 30, 2025 12:50
mxiao-cll
mxiao-cll previously approved these changes Oct 1, 2025
*/
export function parseResponse(
params: TypeFromDefinition<typeof inputParameters.definition>[],
response: AxiosResponse<ResponseSchema>,
Copy link
Contributor

Choose a reason for hiding this comment

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

Can this reference to Axios be removed?

Doesn't look like it's being used anywhere (other than a passed in type) and it's adding a bunch of new packages and preventing the checks from succeeding.

required: true,
default: 'https://artwork-price-oracle-api-dev-ms.liveart.ai',
},
BEARER_TOKEN: {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is there an expiry date on this BEARER_TOKEN? Can you double check with the ticket reporter/API provider?

description: 'The API URL for the LiveArt data provider',
type: 'string',
required: true,
default: 'https://artwork-price-oracle-api-dev-ms.liveart.ai',
Copy link
Contributor

Choose a reason for hiding this comment

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

this is their prod API?

export const inputParameters = new InputParameters(
{
artwork_id: {
aliases: ['artworkId'],
Copy link
Contributor

Choose a reason for hiding this comment

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

doesn't really need an alias since this is a pretty non-standard use-case.
choose 1 and we'll go with that

total_shares: number | null
nav_per_share: string | null
valuation_price_date: string | null
valuation_price: string | null
Copy link
Contributor

Choose a reason for hiding this comment

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

Will these be returned as explicit null or just missing from the API response ie: undefined? If just missing you can try replacing the nulls by ?:

})
}

return params.map((param: TypeFromDefinition<typeof inputParameters.definition>) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

do you need this type defined here?

Copy link
Contributor

@mmcallister-cll mmcallister-cll left a comment

Choose a reason for hiding this comment

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

Find the correct API and get creds. This does not exist against the provided dev environment and we shouldn't merge without testing against prod.

params: [param],
request: {
baseURL: adapterSettings.API_BASE_URL,
url: `/artwork/${param.artwork_id}/price`,
Copy link
Contributor

Choose a reason for hiding this comment

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

this endpoint doesn't exist

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