1.0.11 • Published 2 years ago

krypto-api-sdk v1.0.11

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

krypto.mn

Table of Contents

Install

$ npm install krypto-api-sdk
# OR
$ yarn add krypto-api-sdk

Usage

const Krypto = require('krypto-spi-sdk')

const BASE_URL = '********'
const client = new Krypto(BASE_URL)

let query = { start: 0, limit: 100 }

client.getCryptoMarketPairsLatest(query).then(console.log).catch(console.error)

API

Table of Contents

getCryptoQuotesLatest

Url

  • /cryptocurrency/quotes/latest

Parameter

  • options (Object) Options for the request:
    • options.slug
    • options.symbol

Examples

const client = new Krypto(BASE_URL)
client.getCryptoQuotesLatest(query).then(console.log).catch(console.error)

getCryptoMarketPairsLatest

Url

  • /cryptocurrency/market-pairs/latest

Parameters

  • options (Object) Options for the request:
    • options.id (Array)
    • options.slug
    • options.symbol

Examples

const client = new Krypto(BASE_URL)
client.getCryptoMarketPairsLatest(query).then(console.log).catch(console.error)

getCryptoMap

Url

  • /cryptocurrency/map

Parameters

  • options (Object) Options for the request:
    • options.start
    • options.limit

Examples

const client = new Krypto(BASE_URL)
client.getCryptoMap(query).then(console.log).catch(console.error)

getFiatMap

Url

  • /fiat/map

Parameters

  • options (Object) Options for the request:
    • options.start
    • options.limit

Examples

const client = new Krypto(BASE_URL)
client.getFiatMap(query).then(console.log).catch(console.error)

getCryptoListingsLatest

Url

  • /cryptocurrency/listings/latest

Parameters

  • options (Object) Options for the request:
    • options.start
    • options.limit

Examples

const client = new Krypto(BASE_URL)
client.getCryptoListingsLatest().then(console.log).catch(console.error)

getCryptoListingsTrending

Url

  • /cryptocurrency/listings/trending

Parameters

  • options (Object) Options for the request:
    • options.start
    • options.limit

Examples

const client = new Krypto(BASE_URL)
client.getCryptoListingsTrending().then(console.log).catch(console.error)

getCryptoListingsGainers

Url

  • /cryptocurrency/listings/gainers

Parameters

  • options (Object) Options for the request:
    • options.start
    • options.limit

Examples

const client = new Krypto(BASE_URL)
client.getCryptoListingsGainers(query).then(console.log).catch(console.error)

getCryptoListingsRecent

Url

  • /cryptocurrency/listings/recent

Parameters

  • options (Object) Options for the request:
    • options.start
    • options.limit

Examples

const client = new Krypto(BASE_URL)
client.getCryptoListingsRecent().then(console.log).catch(console.error)

getCryptoTag

Url

  • /cryptocurrency/tag

Parameters

Examples

const client = new Krypto(BASE_URL)
client.getCryptoTag(query).then(console.log).catch(console.error)

getCryptoInfo

Url

  • /exchange/info

Parameters

  • options (Object) Options for the request:
    • options.id
    • options.slug
    • options.symbol

Examples

const client = new Krypto(BASE_URL)
client.getCryptoInfo(query).then(console.log).catch(console.error)

getMetricsQuotesLatest

Url

  • /metrics/quotes/latest

Parameters

Examples

const client = new Krypto(BASE_URL)
client.getMetricsQuotesLatest(query).then(console.log).catch(console.error)

getMetricsFearAndGreed

Url

  • /metrics/fear-and-greed

Parameters

Examples

const client = new Krypto(BASE_URL)
client.getMetricsFearAndGreed(query).then(console.log).catch(console.error)

getToolsConversionRates

Url

  • /tools/conversion-rates

Parameters

  • options (Object) Options for the request:
    • options.symbol
    • options.convert

Examples

const client = new Krypto(BASE_URL)
client.getToolsConversionRates(query).then(console.log).catch(console.error)

getExchangeInfo

Url

  • /news

Parameters

  • options (Object) Options for the request:
    • options.id
    • options.slug

Examples

const client = new Krypto(BASE_URL)
client.getExchangeInfo(query).then(console.log).catch(console.error)

getExchangeListingsLatest

Url

  • /exchange/listings/latest

Parameters

  • options (Object) Options for the request:
    • options.start
    • options.limit

Examples

const client = new Krypto(BASE_URL)
client.getExchangeListingsLatest(query).then(console.log).catch(console.error)

getExchangeMarketPairs

Url

  • /exchange/market-pairs/latest

Parameters

  • options (Object) Options for the request:
    • options.id
    • options.slug
    • options.start
    • options.limit

Examples

const client = new Krypto(BASE_URL)
client.getExchangeMarketPairs(query).then(console.log).catch(console.error)

getNews

Url

  • /news/latest

Parameters

  • options (Object) Options for the request:
    • options.start
    • options.limit

Examples

const client = new Krypto(BASE_URL)
client.getNews(query).then(console.log).catch(console.error)

getSingleNews

Url

  • /news

Parameters

  • options (Object) Options for the request:
    • options.slug
    • options.tag
    • options.start
    • options.limit

Examples

const client = new Krypto(BASE_URL)
client.getSingleNews(query).then(console.log).catch(console.error)

getNewsSearch

Url

  • /news/search

Parameters

  • options (Object) Options for the request:
    • options.slug
    • options.tag
    • options.start
    • options.limit

Examples

const client = new Krypto(BASE_URL)
client.getNewsSearch(query).then(console.log).catch(console.error)

getNewsTag

Url

  • /news/tag/map

Parameters

  • options (Object) Options for the request:
    • options.start
    • options.limit

Examples

const client = new Krypto(BASE_URL)
client.getNewsTag(query).then(console.log).catch(console.error)

getNewsTagInfo

Url

  • /news/tag/info

Parameters

  • options (Object) Options for the request:
    • options.slug
    • options.id

Examples

const client = new Krypto(BASE_URL)
client.getNewsTagInfo(query).then(console.log).catch(console.error)

getAdCategoryMap

Url

  • /ad/category/map

Parameters

  • options (Object) Options for the request:
    • options.start
    • options.limit

Examples

const client = new Krypto(BASE_URL)
client.getAdCategoryMap(query).then(console.log).catch(console.error)

getAdAssetLatest

Url

  • /ad/category/map

Parameters

  • options (Object) Options for the request:
    • options.id
    • options.slug
    • options.symbol
    • options.category
    • options.limit

Examples

const client = new Krypto(BASE_URL)
client.getAdAssetLatest(query).then(console.log).catch(console.error)

License

Licensed under the MIT License.

1.0.11

2 years ago

1.0.10

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.1.0

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago