tokenly/tokenmap-client

A tokenmap client library

v2.1.0 2018-09-19 14:13 UTC

This package is not auto-updated.

Last update: 2024-11-10 06:33:22 UTC


README

A tokenmap client library for Tokenly.

Build Status

Installation

Add the package via composer

composer require tokenly/tokenmap-client

Usage with Laravel

Set the environment variables

TOKENMAP_CONNECTION_URL=https://tokenmap.tokenly.com

Simple BTC quote

Get a BTC quote in USD. This will use the sources as defined in the Tokenmap interface.

$tokenmap_client = app('Tokenly\TokenmapClient\TokenmapClient');
$usd_float = $tokenmap_client->getSimpleQuote('USD', 'BTC', 'bitcoin')->getFloatValue();

Get token information

$tokenmap_client = app('Tokenly\TokenmapClient\TokenmapClient');
$all_tokens = $tokenmap_client->allTokens();