Updated on 2026-08-14
This commit is contained in:
parent
3a4ba6dd5a
commit
3920719b01
6 changed files with 123 additions and 0 deletions
|
|
@ -0,0 +1,31 @@
|
|||
package com.tangem.domain.markets
|
||||
|
||||
import java.math.BigDecimal
|
||||
|
||||
/**
|
||||
* Token exchange
|
||||
*
|
||||
* @property id id
|
||||
* @property name name
|
||||
* @property imageUrl image url
|
||||
* @property isCentralized CEX (true), DEX (false)
|
||||
* @property volumeInUsd aggregated volume in USD
|
||||
* @property trustScore trust score
|
||||
*
|
||||
[REDACTED_AUTHOR]
|
||||
*/
|
||||
data class TokenMarketExchange(
|
||||
val id: String,
|
||||
val name: String,
|
||||
val imageUrl: String?,
|
||||
val isCentralized: Boolean,
|
||||
val volumeInUsd: BigDecimal,
|
||||
val trustScore: TrustScore,
|
||||
) {
|
||||
|
||||
enum class TrustScore {
|
||||
Risky,
|
||||
Caution,
|
||||
Trusted,
|
||||
}
|
||||
}
|
||||
|
|
@ -40,4 +40,11 @@ interface MarketsTokenRepository {
|
|||
token: TokenMarketParams,
|
||||
network: TokenMarketInfo.Network,
|
||||
): CryptoCurrency?
|
||||
|
||||
/**
|
||||
* Get token exchanges
|
||||
*
|
||||
* @param tokenId token id
|
||||
*/
|
||||
suspend fun getTokenExchanges(tokenId: String): List<TokenMarketExchange>
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue