Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[LIBS] BTCPay: Nuova funzione rates (ex exchanges) #88

Open
jambtc opened this issue Mar 4, 2020 · 0 comments
Open

[LIBS] BTCPay: Nuova funzione rates (ex exchanges) #88

jambtc opened this issue Mar 4, 2020 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@jambtc
Copy link
Member

jambtc commented Mar 4, 2020

/**
* imposta il "Preferred price source" del NEGOZIO
* @param: id_store
* @return: true/false
* necessita di avere impostati prima lo storeId
*/
// Rinominare in rates . La funzione principale è quella sì di recuperare il price, ma magari anche avendo impostato lo spread che il commerciante deve guadagnare

Nella nuova funzione btcpay->rates DEVE selezionare prima le coin,

Binance: btc_usdt, ltc_usdt, eth_usdt, bch_usdt, iota_usdt, eur_usdt
Kraken: btc_eur, ltc_eur, eth_eur, bch_eur, iota_eur, eur_usd
Bitstamp: al momento non funziona!!!

PAIRS VALUE
binance(BTC_USDT) = 8733.34
binance(LTC_USDT) = 60.2
binance(ETH_USDT) = 223.63
binance(BCH_USDT) = 322.88
binance(IOTA_USDT) = 0.2216
binance(EUR_USDT) = 1.1006

Con il cambio EUR_USDT si possono ricavare gli importi in EURO.

Inoltre, tenere conto che nei diversi exchanges (al momento bitstamp, kraken e binance) usdt e usd sono diversi.

Il campo DefaultCurrencyPairs deve essere preparato in automatico in base agli ASSET abilitati al singolo commerciante. Es.

Nominativo Exchange Asset Abilitati Impostazioni Note
Commerc. 1 Kraken BTC, LTC btc_eur, ltc_eur kraken ha euro
Commerc. 2 Binance BTC btc_usdt, eur_usdt binance non ha euro ma cambio usdt euro
@jambtc jambtc added the enhancement New feature or request label Mar 4, 2020
@jambtc jambtc self-assigned this Mar 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant