CoinpaprikaAPI

public struct CoinpaprikaAPI

Coinpaprika API endpoints

  • Get global information

    Declaration

    Swift

    public static func global() -> Request<GlobalStats>

    Return Value

    Request to perform

  • Get all coins listed on coinpaprika

    Declaration

    Swift

    public static func coins() -> Request<[Coin]>

    Return Value

    Request to perform

  • Get coin details

    Declaration

    Swift

    public static func coin(id: String) -> Request<CoinExtended>

    Parameters

    id

    ID of coin to return e.g. btc-bitcoin, eth-ethereum

    Return Value

    Request to perform

  • Get a list of exchanges where coin is listed

    Declaration

    Swift

    public static func coinExchanges(id: String) -> Request<[CoinExchange]>

    Parameters

    id

    ID of coin to return e.g. btc-bitcoin, eth-ethereum

    Return Value

    Request to perform

  • Get a list of markets where coin is available

    Declaration

    Swift

    public static func coinMarkets(id: String, quotes: [QuoteCurrency] = [.usd]) -> Request<[CoinMarket]>

    Parameters

    id

    ID of coin to return e.g. btc-bitcoin, eth-ethereum

    quotes

    list of requested quotes, default [.usd]

    Return Value

    Request to perform

  • Get a list of events related to this coin

    Declaration

    Swift

    public static func coinEvents(id: String) -> Request<[Event]>

    Parameters

    id

    ID of coin to return e.g. btc-bitcoin, eth-ethereum

    Return Value

    Request to perform

  • Get a list of tweets related to this coin

    Declaration

    Swift

    public static func coinTweets(id: String) -> Request<[Tweet]>

    Parameters

    id

    ID of coin to return e.g. btc-bitcoin, eth-ethereum

    Return Value

    Request to perform

  • Get ticker information for all coins

    Declaration

    Swift

    public static func tickers(quotes: [QuoteCurrency] = [.usd]) -> Request<[Ticker]>

    Parameters

    quotes

    list of requested quotes, default [.usd], accepted values .usd, .btc, .eth

    Return Value

    Request to perform

  • Get ticker information for specific coin

    Declaration

    Swift

    public static func ticker(id: String, quotes: [QuoteCurrency] = [.usd]) -> Request<Ticker>

    Parameters

    id

    ID of coin to return e.g. btc-bitcoin, eth-ethereum

    Return Value

    Request to perform

  • Search results scope

    See more

    Declaration

    Swift

    public enum SearchCategory : String, CaseIterable, QueryRepresentable
  • Search for currencies/icos/people/exchanges/tags

    Declaration

    Swift

    public static func search(query: String, categories: [SearchCategory] = SearchCategory.allCases, limit: UInt = 6) -> Request<SearchResults>

    Parameters

    query

    phrase for search eg. btc

    categories

    one or more categories (comma separated) to search, default .allCases - see SearchCategory for available options

    limit

    limit of results per category, default 6 (max 250)

    Return Value

    Request to perform

  • Additional fields available in Tag response

    • coins: add this field if you want to match Coins with Tags
    See more

    Declaration

    Swift

    public enum TagsAdditionalFields : String, CaseIterable, QueryRepresentable
  • Tags lists

    Declaration

    Swift

    public static func tags(additionalFields: [TagsAdditionalFields] = []) -> Request<[Tag]>

    Parameters

    additionalFields

    list of additional fields that should be included in response, default: empty - see TagsAdditionalFields for available options

    Return Value

    Request to perform

  • Tag details

    Declaration

    Swift

    public static func tag(id: String, additionalFields: [TagsAdditionalFields] = []) -> Request<Tag>

    Parameters

    id

    tag identifier, like erc20

    additionalFields

    list of additional fields that should be included in response, default: empty - see TagsAdditionalFields for available options

    Return Value

    Request to perform

  • Exchanges list

    Declaration

    Swift

    public static func exchanges(quotes: [QuoteCurrency] = [.usd]) -> Request<[Exchange]>

    Return Value

    Request to perform

  • Exchange details

    Declaration

    Swift

    public static func exchange(id: String, quotes: [QuoteCurrency] = [.usd]) -> Request<Exchange>

    Parameters

    id

    exchange identifier, like binance

    quotes

    list of requested quotes, default [.usd]

    Return Value

    Request to perform

  • Exchange markets

    Declaration

    Swift

    public static func exchangeMarkets(id: String, quotes: [QuoteCurrency] = [.usd]) -> Request<[Market]>

    Parameters

    id

    exchange identifier, like binance

    quotes

    list of requested quotes, default [.usd]

    Return Value

    Request to perform

  • Person details

    Declaration

    Swift

    public static func person(id: String) -> Request<Person>

    Parameters

    id

    person id eg. satoshi-nakamoto

    Return Value

    Request to perform

  • Intervals for historical data endpoint

    See more

    Declaration

    Swift

    public enum TickerHistoryInterval : String, CaseIterable
  • Get historical ticker information for specific coin

    Declaration

    Swift

    public static func tickerHistory(id: String, start: Date, end: Date = Date(), limit: Int = 1000, quote: QuoteCurrency = .usd, interval: TickerHistoryInterval = .minutes5) -> Request<[TickerHistory]>

    Parameters

    id

    ID of coin to return e.g. btc-bitcoin, eth-ethereum

    start

    Start date, required

    end

    End date, default .now

    limit

    Returns limit, default 1000, max 5000

    quote

    requested quote, default .usd

    interval

    data interval, default 5 minutes .minutes5

    Return Value

    Request to perform

  • Latest Open/High/Low/Close values with volume and market_cap

    Declaration

    Swift

    public static func coinLatestOhlcv(id: String, quote: QuoteCurrency = .usd) -> Request<[Ohlcv]>

    Parameters

    id

    ID of coin to return e.g. btc-bitcoin, eth-ethereum

    Return Value

    Request to perform

  • Historical Open/High/Low/Close values with volume and market_cap

    Declaration

    Swift

    public static func coinHistoricalOhlcv(id: String, start: Date, end: Date? = nil, limit: Int = 1, quote: QuoteCurrency = .usd) -> Request<[Ohlcv]>

    Parameters

    id

    ID of coin to return e.g. btc-bitcoin, eth-ethereum

    start

    Start date, required

    end

    End date, if not provided calculated by the limit parameter

    limit

    Returns limit, default 1, max 366

    quote

    requested quote, default .usd

    Return Value

    Request to perform