io.api.bloxy.core.IDexApi.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of bloxy-api Show documentation
Show all versions of bloxy-api Show documentation
Kotlin & Java Library for all available Bloxy API endpoints
package io.api.bloxy.core
import io.api.bloxy.model.dto.dex.*
import org.jetbrains.annotations.NotNull
/**
* API for Analysis of decentralised exchanges (DEX)
* More information - https://bloxy.info/api_methods#dex
*
* @author GoodforGod
* @since 16.11.2018
*/
interface IDexApi {
/**
* Lists DEX protocol names and count of implementations in smart contracts
*/
@NotNull
fun protocols(): List
/**
* Lists tokens by matching text in symbol or name. List is sorted descending by transaction count
* @param protocols dex to filter
* @param limit max result
* @param offset of the list from origin (0)
* @param timeSpanDays get info for period in days from today
*/
@NotNull
fun contracts(
protocols: List = emptyList(),
limit: Int = 100,
offset: Int = 0,
timeSpanDays: Int = 30
): List
/**
* Lists trades, optionally filtered by protocol, DEX smart contract(s) and/or token(s).
* @param protocols dex to filter
* @param dexContracts dex to filter
* @param tokenAddresses to filter
* @param limit max result
* @param offset of the list from origin (0)
* @param timeSpanDays get info for period in days from today
*/
@NotNull
fun trades(
protocols: List = emptyList(),
dexContracts: List = emptyList(),
tokenAddresses: List = emptyList(),
limit: Int = 100,
offset: Int = 0,
timeSpanDays: Int = 5
): List
/**
* Lists transactions sent to DEXes in pending state (not mined yet).
* @param protocols to filter
* @param dexContracts to filter
*/
@NotNull
fun pendingTxs(
protocols: List = emptyList(),
dexContracts: List = emptyList()
): List
/**
* Lists active traders ordered by number of trades, as maker or taker.
* !!! Note, that the data does not include the last day trades
* @param protocols dex to filter
* @param dexContracts dex to filter
* @param limit max result
* @param offset of the list from origin (0)
* @param timeSpanDays get info for period in days from today
*/
@NotNull
fun tradesActive(
protocols: List = emptyList(),
dexContracts: List = emptyList(),
limit: Int = 100,
offset: Int = 0,
timeSpanDays: Int = 30
): List
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy