Skip to content

Data Service

Aleksandr Ershov edited this page Jul 16, 2019 · 8 revisions

is a special Waves service for simple and convenient way to get data from Waves blockchain.

The full list of the Data service methods is available at Data Service Swagger and Test Data Service Swagger

All code of Data Service available here

Methods list:

  • alias()
    /**
     * Get address for alias
     */
    @GET("v0/aliases/{alias}")
    fun alias(@Path("alias") alias: String?): Observable<AliasDataResponse>
  • aliases()
    /**
     * Get a list of aliases for a given address
     */
    @GET("v0/aliases")
    fun aliases(@Query("address") address: String?): Observable<AliasesResponse>
  • assets()
    /**
     * Get a list of assets info from a list of IDs
     */
    @GET("v0/assets")
    fun assets(@Query("ids") ids: List<String?>): Observable<AssetsInfoResponse>
  • pairs()
    /**
     * Get pair info by amount and price assets
     */
    @GET("v0/pairs/{amountAsset}/{priceAsset}")
    fun pairs(@Path("amountAsset") amountAsset: String?,
              @Path("priceAsset") priceAsset: String?): Observable<PairResponse>
  • transactionsExchange()
    /**
     * Get a list of exchange transactions by applying filters
     */
    @GET("v0/transactions/exchange")
    fun transactionsExchange(
            @Query("amountAsset") amountAsset: String?,
            @Query("priceAsset") priceAsset: String?,
            @Query("limit") limit: Int
    ): Observable<LastTradesResponse>
  • candles()
    /**
     * Get candles by amount and price assets. Maximum amount of candles in response – 1440.
     */
    @GET("candles/{amountAsset}/{priceAsset}")
    fun candles(
            @Path("amountAsset") amountAsset: String?,
            @Path("priceAsset") priceAsset: String?,
            @Query("interval") interval: String,
            @Query("timeStart") timeStart: Long,
            @Query("timeEnd") timeEnd: Long
    ): Observable<CandlesResponse>
Clone this wiki locally