Skip to content

Latest commit

 

History

History
25 lines (24 loc) · 683 Bytes

README.md

File metadata and controls

25 lines (24 loc) · 683 Bytes

CoinCapSwiftAPI

A CoinCap API written on a modern language Swift.

Usage

Get assets sorted by rank:

Coincap().assets { (cryptocurrencies) in
    print(cryptocurrencies.map { $0.name })
    // Prints ["Bitcoin", "Ethereum", "Tether", "XRP" ... ]
}

Search assets:

Coincap().assets(search: "Bitcoin") { (cryptocurrencies) in
    print(cryptocurrencies.map { $0.name })
    // Prints ["Bitcoin", "Bitcoin Cash", "Bitcoin SV" ... ]
}

Search assets by id:

Coincap().assets(ids: ["bitcoin", "ethereum", "nano"]) { (cryptocurrencies) in
    print(cryptocurrencies.map { $0.name })
    // Prints ["Bitcoin", "Ethereum", "Nano"]
}