互换
Swap允许你从各种服务中检索货币汇率,如Fixer, Currency Data, Exchange Rates Data或Abstract,并可以选择缓存结果。它与其他库集成,如moneyphp/money,并提供一个Symfony Bundle和一个Laravel Package。
数字货币- 智能合约交易所app系统开发
数字货币交易所开发现成源码案例
数字货币交易所交易系统开发解决方案
数字货币交易所开发解决方案,数字交易系统搭建
交易所开发源码,数字货币永续合约交易平台搭建
数字货币交易平台开发_数字货币交易所系统搭建
数字货币交易所- 开源软件分享
现成数字货币交易所源码系统开发
Search Results for 数字货币交易所源代码
区块链交易所搭建, 币币交易系统搭建
去中心化交易所搭建|区块链数字货币交易平台开发
区块链交易所搭建,币币交易系统搭建
数字货币交易所系统开发技术原理丨数字货币交易所开发(源码案例)
赞助商
Fixer是一个简单和轻量级的外汇汇率API,支持多达170种世界货币。
货币数据为您的企业提供可靠的汇率和货币转换,最多可支持168种世界货币。
汇率数据为您的业务提供可靠的汇率和货币转换,有超过15个数据源。
摘要为开发者提供简单的汇率,以及涵盖数千种使用情况的十几个API。
快速入门
$ composer require php-http/curl-client nyholm/psr7 php-http/message florianv/swap
use Swap\Builder;
// Build Swap
$swap = (new Builder())
// Use the Fixer service as first level provider
->add('apilayer_fixer', ['api_key' => 'Get your key here: https://fixer.io/'])
// Use the Currency Data service as first fallback
->add('apilayer_currency_data', ['api_key' => 'Get your key here: https://apilayer.com/marketplace/currency_data-api'])
// Use the Exchange Rates Data service as second fallback
->add('apilayer_exchange_rates_data', ['api_key' => 'Get your key here: https://apilayer.com/marketplace/exchangerates_data-api'])
// Use the Abstract Api service as third fallback
->add('abstract_api', ['api_key' => 'Get your key here: https://app.abstractapi.com/users/signup'])
->build();
// Get the latest EUR/USD rate
$rate = $swap->latest('EUR/USD');
// 1.129
$rate->getValue();
// 2016-08-26
$rate->getDate()->format('Y-m-d');
// Get the EUR/USD rate 15 days ago
$rate = $swap->historical('EUR/USD', (new \DateTime())->modify('-15 days'));
We recommend to use the services that support our project, providing a free plan up to 100 requests per month.
Documentation
The documentation for the current branch can be found here.
Services
Here is the list of the currently implemented services:
Service Base Currency Quote Currency Historical
Fixer EUR (free, no SSL), (paid) Yes
Currency Data USD (free), (paid) Yes
Exchange Rates Data USD (free), (paid) Yes
Abstract Yes
coinlayer Crypto (Limited standard currencies) Crypto (Limited standard currencies) Yes
Fixer EUR (free, no SSL), (paid) Yes
currencylayer USD (free), (paid) Yes
exchangeratesapi USD (free), (paid) Yes
European Central Bank EUR * Yes
National Bank of Georgia * GEL Yes
National Bank of the Republic of Belarus * BYN (from 01-07-2016),
BYR (01-01-2000 - 30-06-2016),
BYB (25-05-1992 - 31-12-1999) Yes
National Bank of Romania RON, AED, AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, EGP, EUR, GBP, HRK, HUF, INR, JPY, KRW, MDL, MXN, NOK, NZD, PLN, RSD, RUB, SEK, TRY, UAH, USD, XAU, XDR, ZAR RON, AED, AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, EGP, EUR, GBP, HRK, HUF, INR, JPY, KRW, MDL, MXN, NOK, NZD, PLN, RSD, RUB, SEK, TRY, UAH, USD, XAU, XDR, ZAR Yes
National Bank of Ukranie * UAH Yes
Central Bank of the Republic of Turkey * TRY Yes
Central Bank of the Republic of Uzbekistan * UZS Yes
Central Bank of the Czech Republic * CZK Yes
Central Bank of Russia * RUB Yes
Bulgarian National Bank * BGN Yes
WebserviceX No
1Forge (free but limited or paid) (free but limited or paid) No
Cryptonator Crypto (Limited standard currencies) Crypto (Limited standard currencies) No
CurrencyDataFeed (free but limited or paid) (free but limited or paid) No
Open Exchange Rates USD (free), (paid) Yes
Xignite Yes
Currency Converter API Yes (free but limited or paid)
xChangeApi.com Yes
fastFOREX.io USD (free), (paid) No
exchangerate.host Yes
Array Yes
此外,你可以添加你自己的服务,只要它们实现了ExchangeRateService接口。
集成
一个Symfony包 FlorianvSwapBundle
一个Laravel包 florianv/laravel-swap
贡献者
Florian Voutzinos
所有贡献者
许可证
MIT许可证(MIT)。请参阅LICENSE以了解更多信息。