Skip to content
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

Feature/include normalize prices function #50

Merged
merged 2 commits into from
May 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
echo "New files detected, committing and pushing them"
git add package.json
git commit -S -m "Bump package version"
git push
git push -f
else
echo "No new files, exiting cleanly"
fi
Expand Down
12 changes: 11 additions & 1 deletion src/pyth/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
import { AxiosInstance } from 'axios';
import { PythConfig } from '../interfaces/classConfigs';
import { getLatestPricesFromPyth, getPythClient, getVaaPriceUpdateData, normalizePythPriceForParifi } from './pyth';
import {
getLatestPricesFromPyth,
getLatestPricesNormalized,
getPythClient,
getVaaPriceUpdateData,
normalizePythPriceForParifi,
} from './pyth';
import { getPriceIdsForCollaterals } from '../common';

export class Pyth {
Expand Down Expand Up @@ -31,6 +37,10 @@ export class Pyth {
return await getLatestPricesFromPyth(priceIds, this.pythClient);
}

public async getLatestPricesNormalized(priceIds: string[]) {
return await getLatestPricesNormalized(priceIds, this.pythClient);
}

public getPriceIdsForCollaterals() {
return getPriceIdsForCollaterals(true);
}
Expand Down
Loading