-
-
Save sturdysturge/67194f07a965db5d7e7271c38e0d097b to your computer and use it in GitHub Desktop.
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
import Foundation | |
struct TickerData: Codable { | |
let name: String | |
let tickers: [Ticker] | |
} | |
struct Ticker: Codable { | |
let base: Base | |
let target: String | |
let market: Market | |
let last, volume: Double | |
} | |
enum Base: String, Codable { | |
case dog = "DOG" | |
case doge = "DOGE" | |
case doge3L = "DOGE3L" | |
case xdg = "XDG" | |
} | |
struct Market: Codable { | |
let name, identifier: String | |
let hasTradingIncentive: Bool | |
enum CodingKeys: String, CodingKey { | |
case name, identifier | |
case hasTradingIncentive = "has_trading_incentive" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment