Skip to content

Commit 7c04a87

Browse files
authored
Add 24h spot volume to PerpetualMarket (#775)
1 parent 37a7042 commit 7c04a87

File tree

5 files changed

+17
-13
lines changed

5 files changed

+17
-13
lines changed

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ allprojects {
5252
}
5353

5454
group = "exchange.dydx.abacus"
55-
version = "1.13.48"
55+
version = "1.13.49"
5656

5757
repositories {
5858
google()

src/commonMain/kotlin/exchange.dydx.abacus/output/Market.kt

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -863,6 +863,7 @@ data class PerpetualMarket(
863863
val marketCaps: Double?,
864864
val priceChange24H: Double?,
865865
val priceChange24HPercent: Double?,
866+
val spot24hVolume: Double? = null,
866867
val status: MarketStatus?,
867868
val configs: MarketConfigs?,
868869
val perpetual: MarketPerpetual?,
@@ -914,17 +915,18 @@ data class PerpetualMarket(
914915
existing
915916
} else {
916917
PerpetualMarket(
917-
id,
918-
assetId,
919-
market,
920-
displayId,
921-
oraclePrice,
922-
marketCaps,
923-
priceChange24H,
924-
priceChange24HPercent,
925-
status,
926-
configs,
927-
perpetual,
918+
id = id,
919+
assetId = assetId,
920+
market = market,
921+
displayId = displayId,
922+
oraclePrice = oraclePrice,
923+
marketCaps = marketCaps,
924+
priceChange24H = priceChange24H,
925+
priceChange24HPercent = priceChange24HPercent,
926+
spot24hVolume = null,
927+
status = status,
928+
configs = configs,
929+
perpetual = perpetual,
928930
)
929931
}
930932
}

src/commonMain/kotlin/exchange.dydx.abacus/processor/markets/MarketProcessor.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,7 @@ internal class MarketProcessor(
225225
priceChange24H = parser.asDouble(payload.priceChange24H),
226226
oraclePrice = oraclePrice,
227227
),
228+
spot24hVolume = parser.asDouble(payload.volume24H),
228229
status = status,
229230
configs = createConfigs(payload),
230231
perpetual = createMarketPerpetual(

src/commonTest/kotlin/exchange.dydx.abacus/processor/markets/MarketProcessorTests.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,7 @@ class MarketProcessorTests {
6868
marketCaps = null,
6969
priceChange24H = 138.180620,
7070
priceChange24HPercent = 0.006957097804400636,
71+
spot24hVolume = 4.245227823171E8,
7172
status = MarketStatus(
7273
canTrade = true,
7374
canReduce = true,

v4_abacus.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Pod::Spec.new do |spec|
22
spec.name = 'v4_abacus'
3-
spec.version = '1.13.48'
3+
spec.version = '1.13.49'
44
spec.homepage = 'https://github.com/dydxprotocol/v4-abacus'
55
spec.source = { :http=> ''}
66
spec.authors = ''

0 commit comments

Comments
 (0)