CoinpaprikaAPI

public struct CoinpaprikaAPI

Coinpaprika API endpoints

  • Get global information

    Declaration

    Swift

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

    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 CoinsAdditionalFields : String, CaseIterable, QueryRepresentable
  • Get all coins listed on coinpaprika

    Declaration

    Swift

    public static func coins(additionalFields: [CoinsAdditionalFields] = []) -> Request<[Coin]>

    Parameters

    additionalFields

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

    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

  • Declaration

    Swift

    public static func createEvent(coinId: String, date: String, dateTo: String?, name: String, description: String?, isConference: Bool, link: URL, proofImageLink: URL?) -> Request<StatusResponse>
  • 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]

    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

    quotes

    list of requested quotes, default [.usd]

    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

  • Get a list of tweets related to this person

    Declaration

    Swift

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

    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

  • Latest News

    Declaration

    Swift

    public static func latestNews(limit: Int = 3) -> Request<[News]>

    Parameters

    limit

    Returns limit, default 3

    Return Value

    Request to perform

  • Historical News

    Declaration

    Swift

    public static func historicalNews(start: Date, end: Date? = nil) -> Request<[News]>

    Parameters

    start

    Start date, required

    end

    End date, if not provided returns news from 1 day, max period 30 days

    Return Value

    Request to perform

  • Type for Top Movers endpoint

    See more

    Declaration

    Swift

    public enum TopMoversType : String, CaseIterable
  • Time range for Top Movers endpoint

    See more

    Declaration

    Swift

    public enum TopMoversTimeRange : String, CaseIterable
  • Market cap limit for Top Movers endpoint

    See more

    Declaration

    Swift

    public enum TopMoversLimit : String, CaseIterable
  • Top Movers Ranking - Gainers & Losers

    Declaration

    Swift

    public static func topMovers(type: TopMoversType = .price, range: TopMoversTimeRange = .day, limit: TopMoversLimit = .all, quote: QuoteCurrency = .usd, resultsNumber: Int = 10) -> Request<TopMovers>

    Parameters

    type

    Metric used in ranking - .price or .volume, default .price

    range

    Time range - .day or .week, default .day

    limit

    Coins market cap limit used in ranking - .top200 or .all, default .all

    quote

    Quote currency - .usd or .btc, default .usd

    resultsNumber

    Results number, default 10

    Return Value

    Request to perform

  • List of available Fiat’s currencies - accepted as quotes by tickers, exchanges, markets endpoints.

    Declaration

    Swift

    public static func fiats() -> Request<[Fiat]>

    Return Value

    Request to perform