Created
January 5, 2022 06:16
-
-
Save kgravenreuth/a22423d1be92d04ff0e70e02dea9262a to your computer and use it in GitHub Desktop.
Cloudbet Market Helper - Displaying odds for simple markets
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 { | |
MarketType, | |
getMarket | |
} from "@cloudbet/market-helper"; | |
const sportMarkets = { | |
"soccer": [MarketType.soccer_match_odds], | |
"basketball": [MarketType.basketball_1x2], | |
"american-football": [MarketType.american_football_quarter_total] | |
}; | |
function getMarkets(event, sportKey) { | |
const [markets] = getMarket(event, sportMarkets[sportKey][0]); | |
return markets; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment