tokenly / tokenmap-client
A tokenmap client library
Installs: 4 027
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 4
Forks: 0
Open Issues: 0
Requires
- php: >=7.0.0
- guzzlehttp/guzzle: ~6.0
- tokenly/api-client: ^1.1
- tokenly/crypto-quantity: ^2
Requires (Dev)
- mockery/mockery: dev-master
- phpunit/phpunit: ^5
This package is not auto-updated.
Last update: 2024-11-24 06:46:07 UTC
README
A tokenmap client library for Tokenly.
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();