-
Notifications
You must be signed in to change notification settings - Fork 5
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
Feat #43: Adds support for ohcl and pair endpoints #44
Feat #43: Adds support for ohcl and pair endpoints #44
Conversation
Thanks @Micrograx for bringing this change :) |
@@ -49,6 +49,7 @@ library | |||
Maestro.API.V1.Addresses | |||
Maestro.API.V1.Blocks | |||
Maestro.API.V1.Datum | |||
Maestro.API.V1.DefiMarkets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would usually prefer just "Markets" as it matches exactly with path name but of course not a big deal.
toQueryParam = T.pack . show | ||
|
||
-- | Because there is only one dex at the moment, the derivation returns "[]". This can be removed once support for a new dex is added. | ||
instance FromJSON Dex where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
JSON instances could have been conveniently derived using deriving-aeson
like done here
haskell-sdk/src/Maestro/Types/V1/Addresses.hs
Lines 25 to 28 in 68a59cd
-- | Denotes network for the entity in question, such as address. | |
data NetworkId = NIDMainnet | NIDTestnet | |
deriving stock (Show, Eq, Ord, Generic) | |
deriving (FromJSON, ToJSON) via CustomJSON '[ConstructorTagModifier '[StripPrefix "NID", LowerFirst]] NetworkId |
, dexPairInfoCoinAPolicy :: PolicyId | ||
, dexPairInfoCoinBAssetName :: TokenName | ||
, dexPairInfoCoinBPolicy :: PolicyId | ||
, dexPairInfoPair :: String |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SDK is more inclined towards using Text
.
The PR looks really good, great work @Micrograx. @Vardominator Could you merge it? I'll bring updated version with changelog & minor improvements in another PR. |
Summary
This PR includes support for OHLC candles and dex pairs endpoints from the defi markets category
Type of Change
Please mark the relevant option(s) for your pull request:
Checklist
Please ensure that your pull request meets the following criteria:
Testing
No new tests were added
Observations
The OHLC endpoint has more query parameters that were not included in this PR