-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update Historical Price Data Integration: Remove Figure dlob, Add Osm…
…osis (#518) * add osmosis api call and a test for running call * add source column to token historical daily, add date calculation for query to osmosis * refactor async service to use osmosis * dynamically determine time frames for osmosis api * Add tests * change println to debug statement * remove unused imports * fix lints * reorder imports * round to thrid decimal place * move third decimal calls * remove old dlob calls * add change log --------- Co-authored-by: Matt Witkowski <[email protected]>
- Loading branch information
1 parent
4fdfa73
commit b9972b0
Showing
10 changed files
with
253 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
...se/src/main/resources/db/migration/V1_90__Add_source_column_to_token_historical_daily.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
SELECT 'Add source column to token historical daily' AS comment; | ||
ALTER TABLE token_historical_daily | ||
ADD COLUMN source TEXT; | ||
|
||
UPDATE token_historical_daily | ||
SET source = 'dlob'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
24 changes: 24 additions & 0 deletions
24
service/src/main/kotlin/io/provenance/explorer/domain/models/explorer/OsmosisModels.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package io.provenance.explorer.domain.models | ||
|
||
import java.math.BigDecimal | ||
|
||
data class OsmosisHistoricalPrice( | ||
val time: Long, | ||
val high: BigDecimal, | ||
val low: BigDecimal, | ||
val close: BigDecimal, | ||
val open: BigDecimal, | ||
val volume: BigDecimal | ||
) | ||
|
||
data class OsmosisApiResponse( | ||
val result: OsmosisResult | ||
) | ||
|
||
data class OsmosisResult( | ||
val data: OsmosisData | ||
) | ||
|
||
data class OsmosisData( | ||
val json: List<OsmosisHistoricalPrice> | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.