API (Programmierschnittstelle)

API - Anwendungsprogrammierschnittstelle.
Alle Anforderungen sollten über HTTPS ausgeführt werden.
JSON-RPC wird unterstützt. Um JSON-RPC zu verwenden, fügen Sie am Ende der Anfrage .json hinzu.

POST-Anfragen

JSON-RPC wird unterstützt.

Eine Bestellung aufgeben

Geben Sie eine Bestellung für eine spezifische Wechselrichtung ein. Sie können spezifizieren,wie viel Sie über deposit_amount oder withdrawal_amount Parameter senden oder erhalten müssen.
URL: https://www.alfacashier.io/api/create.json
Method: POST

Data required:
{
  "pair": "Example: 'BTC_LTC'. Direction of the exchange, defined in the form [source_currency_code]_[destination_currency_code].",
  "deposit_amount": "(Optional) example: '4.953', fixed deposit amount you'd like to send for an exchange.",
  "withdrawal_amount": "(Optional) example: '6.431', fixed withdrawal amount you'd like to get after an exchange is made.",
  "email": "Example: '[email protected]'",
  "options": "Example: {'address': '1FgThhtLdSM1i78vXHGovA3WxzbTWA2mse'}, this array of parameters depends on source_currency_code.",
  "r_uid": "(Optional) example: '12345', affiliate program Referral ID.",
  "promo_code": "(Optional) example: 'ALFACODE'."
}
Success Output example:
{
  "secret_key": "Example: '11fb9a42045b0bf35ef40b8e96e45ebe', your order unique secret key which is used to track your order's status.",
  "deposit": "(JSON Object) depending on deposit coin, there will be deposit address, array structure is the same as options.",
  "deposit_amount": "Amount you'd need to send to complete an exchange.",
  "withdrawal_amount": "Amount you'd receive upon completing exchange",
  "order_id": "Unique order id in our system"

}
Error Output example:
{"error": "Missing required argument pair"}
cURL (example):
curl -X POST https://www.alfacashier.io/api/create.json \
     -H "Content-Type:application/json" \
     --data '{"pair":"BTC_LTC","deposit_amount":"1.4561","email":"[email protected]","options":{"address":"mnD8wHZKfdSwoKyW4H44spK2MqGAEXNbG9"}}'
Response (example):
{
  "secret_key": "fdce47f91e4b28c50e9f08beb4e43dee",
  "deposit": {"address":"n1S9pzENwn3QQgHcCE3afyxVrL57798eA2"},
  "deposit_amount": 0.00827399,
  "withdrawal_amount": 0.87673802,
  "order_id": "581572"
}

Aktuellen Wechselkurs bekommen

Mit dieser Funktion wird der aktuelle Wechselkurs zwischen den beiden aktuell ausgewählten Währungen angezeigt. Der Wechselkurs kann sich je nach Marktlage schnell ändern.
URL: https://www.alfacashier.io/api/rate.json
Method: POST

Data required:
{
  "pair": "Example: 'BTC_LTC', direction of the exchange, defined in the form [source_currency_code]_[destination_currency_code].",
  "deposit_amount": "(Optional) example: '4.952', fixed deposit amount you'd like to send for an exchange.",
  "withdrawal_amount": "(Optional) example: '6.431', fixed withdrawal amount you'd like to get after an exchange is made.",
  "promo_code_discount": "(Optional) example: '10', discount percent returned from promo code validation." 
}
Success Output example:
{"pair": "BTC_LTC", "rate": 1.213456}
Error Output example:
{"error": "Invalid pair"}
cURL (example):
curl -X POST https://www.alfacashier.io/api/rate.json \
     -H "Content-Type:application/json" \
     --data '{"pair":"BTC_LTC"}'
Response (example):
{"pair": "BTC_LTC", "rate": "108.82046494"}

Adresse bestätigen

Bestätigen Sie die spezifische Währungsadresse/Konto mit zusätzlichen Parametern wie destination_tag, Nachricht oder payment_ID.
URL: https://www.alfacashier.io/api/validateaddress.json
Method: POST

Data required:
{
  "currency": "Currency code", // example: "BTC", currency codes
  "options": "Example: {'address': '1FgThhtLdSM1i78vXHGovA3WxzbTWA2mse'} This array of parameters depends on source_currency_code" // array of params
}
Success Output example:
{"valid": "true"}
Error Output example:
{"error": "Invalid payment_id"}
cURL (example):
curl -X POST https://www.alfacashier.io/api/validateaddress.json \
>      -H "Content-Type:application/json" \
>      --data '{"currency":"XMR","options":{"address":"46ao2KDAy7fduSxuqFNw389JnLLJYgLrbG6iNyNt37e2D3kqg4QwAmYicyGX6aQ4x3GEHtPQDSGuUXGsTxjr5A2A6oWiaXr","payment_id":"abcdef1234567890abcdef1234567890abcdef1234567890abcdef12345abcde"}}'
Response (example):
{"valid": true}

Promo Code Validation

Validates Promo Code for specific exchange direction (pair).
URL: https://www.alfacashier.io/api/promo_code.json
Method: POST

Data required:
{
  "code": "Example: 'ALFACODE'",
  "pair": "Example: 'BTC_LTC', direction of the exchange, defined in the form [source_currency_code]_[destination_currency_code].", 
}
Success Output example:
{"discount": "10"}
Error Output example:
{"error": "Invalid Promo Code"}
cURL (example):
curl -X POST https://www.alfacashier.io/api/promo_code.json \
     -H "Content-Type:application/json" \
     --data '{"code":"ALFACODE","pair":"BTC_LTC"}'
Response (example):
{"discount": "10"}

Anfragen BEKOMMEN

Sowohl REST als auch JSON-RPC werden unterstützt. Um JSON-RPC zu verwenden, fügen Sie .json am Ende der Anfrage hinzu.

Auftrag Abbrechen

This method cancels the order.
URL: https://www.alfacashier.io/api/cancel/[secret_key]
Method: GET

Data required:
[secret_key] is the secret key of the order, you can get one by creating an order.
Success Output example:
{
  secret_key: "[string] Example: 11fb9a42045b0bf35ef40b8e96e45ebe",
  canceled: "[bool] true/false"
}
Error Output example, can cancel only new and pending order:
{"error": "This operation is not available"}
cURL (example):
curl -X GET https://www.alfacashier.io/api/cancel/11fb9a42045b0bf35ef40b8e96e45ebe \
     -H "Content-Type:application/json"
Response (example):
{
    "secret_key": "42e9a2f527e1b914c9448cd0f3901bc2",
    "canceled": true
}

Get Order Status

Diese Funktion zeigt den Bestellstatus und einige weitere Informationen an.
URL: https://www.alfacashier.io/api/status/[secret_key]
Method: GET

Data required:
[secret_key] is the secret key of the order, you can get one by creating an order.
Success Output example:
{
  secret_key: "[string] Example: 11fb9a42045b0bf35ef40b8e96e45ebe",
  pair: "BTC_LTC",
  status: "expired",
  deposit: "(JSON object) Deposit address or account, and tags",
  withdrawal: "(JSON object) Withdrawal address or account, and tags",
  received_amount: "[double]", // total received amount
  deposit_amount: "[double]", // amount received on deposit address, used for exchange
  withdrawal_amount: "[double]", // amount to sent
  time_created: "[datetime]",
  seconds_remaining: "[int]" // order time remaining before expire
}
Error Output example:
{"error": "Invalid transaction"}
cURL (example):
curl -X GET https://www.alfacashier.io/api/status/11fb9a42045b0bf35ef40b8e96e45ebe \
     -H "Content-Type:application/json"
Response (example):
{
    "secret_key": "42e9a2f527e1b914c9448cd0f3901bc2",
    "pair": "BTC_LTC",
    "status": "new",
    "deposit": {
        "address": "3AtNVzD4Ys8SvyDcbP1HZCGDc7e9qqo2h8"
    },
    "withdrawal": {
        "address": "LYeSuaRrpospcfhDYJyUhwVica7NLNB2hi"
    },
    "received_amount": "0.00000000",
    "deposit_amount": "0.50000000",
    "withdrawal_amount": "74.18250786",
    "time_created": "2019-10-17 12:32:49",
    "seconds_remaining": 4207
}

Get Exchange Limits

Mit dieser Funktion werden die aktuelle Deviseneinlage und Abbuchungslimits für spezifische Wechselrichtungen angezeigt.
URL: https://www.alfacashier.io/api/limit/[pair]
Method: GET

Data required:
[pair] - example: "BTC_LTC", direction of the exchange, defined in the form [source_currency_code]_[destination_currency_code].
Success Output example:
{
    "pair": "BTC_LTC",
    "deposit_min": 0.00251312,
    "deposit_max": 0.62774886,
    "withdrawal_min": 0.37316266,
    "withdrawal_max": 93.29066571,
    "deposit_day_limit": 0,
    "deposit_month_limit": 0,
    "withdrawal_day_limit": 0,
    "withdrawal_month_limit": 0
}
Error Output example:
{"error": "Invalid pair"}
cURL (example):
curl -X GET https://www.alfacashier.io/api/limit/BTC_LTC \
     -H "Content-Type:application/json"
Response (example):
{
  "pair": "BTC_LTC",
  "deposit_min" : 0.0002764,
  "deposit_month_limit" : 0,
  "withdrawal_day_limit" : 15.503875944955,
  "deposit_day_limit" : 0,
  "withdrawal_min" : 0.01550388,
  "withdrawal_month_limit" : 46.511627834866,
  "withdrawal_max" : 0.98130298,
  "deposit_max" : 0.00901763
}

Supported Currencies List

Diese Liste enthält Namen, Währungscode und Verfügbarkeitsstatus für Einlagen und Abbuchungen der unterstützten Währungen durch API.
URL: https://www.alfacashier.io/api/getcoins
Method: GET

Success Output example:
{
  "bitcoin":{
    "currency":"BTC",
    "title":"Bitcoin",
    "deposit":true,
    "withdrawal":true,
    "explorer_tx_link": "https://www.blockchain.com/btc/tx/%hash%",
    "explorer_address_link": "https://www.blockchain.com/btc/address/%address%"
  },
  "litecoin":{
    "currency":"LTC",
    "title":"Litecoin",
    "deposit":false,
    "withdrawal":false,
    "explorer_tx_link": "https://insight.litecore.io/tx/%hash%",
    "explorer_address_link": "https://insight.litecore.io/address/%address%"
  }
}
cURL (example):
curl -X GET https://www.alfacashier.io/api/getcoins \
     -H "Content-Type:application/json"
Response (example):
{
    "bitcoin": {
        "currency": "BTC",
        "title": "Bitcoin",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://blockchair.com/bitcoin/transaction/%hash%",
        "explorer_address_link": "https://blockchair.com/bitcoin/address/%address%"
    },
    "xrp": {
        "currency": "XRP",
        "title": "XRP",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://bithomp.com/explorer/%hash%",
        "explorer_address_link": "https://bithomp.com/explorer/%address%"
    },
    "ethereum": {
        "currency": "ETH",
        "title": "Ethereum",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://etherscan.io/tx/%hash%",
        "explorer_address_link": "https://etherscan.io/address/%address%"
    },
    "bitcoincash": {
        "currency": "BCH",
        "title": "Bitcoin Cash",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://blockchair.com/bitcoin-cash/transaction/%hash%",
        "explorer_address_link": "https://blockchair.com/bitcoin-cash/address/%address%"
    },
    "litecoin": {
        "currency": "LTC",
        "title": "Litecoin",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://insight.litecore.io/tx/%hash%",
        "explorer_address_link": "https://insight.litecore.io/address/%address%"
    },
    "eos": {
        "currency": "EOS",
        "title": "EOS",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://bloks.io/transaction/%hash%",
        "explorer_address_link": "https://bloks.io/account/%address%"
    },
    "stellar": {
        "currency": "XLM",
        "title": "Stellar",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://stellarchain.io/tx/%hash%",
        "explorer_address_link": "https://stellarchain.io/address/%address%"
    },
    "tether": {
        "currency": "USDT",
        "title": "Tether",
        "deposit": false,
        "withdrawal": true,
        "explorer_tx_link": "https://www.omniexplorer.info/tx/%hash%",
        "explorer_address_link": "https://www.omniexplorer.info/address/%address%"
    },
    "monero": {
        "currency": "XMR",
        "title": "Monero",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://xmrchain.net/tx/%hash%",
        "explorer_address_link": "https://www.alfacashier.io/#%address%"
    },
    "dash": {
        "currency": "DASH",
        "title": "Dash",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://chainz.cryptoid.info/dash/tx.dws?%hash%.htm",
        "explorer_address_link": "https://chainz.cryptoid.info/dash/address.dws?%address%.htm"
    },
    "ethereumclassic": {
        "currency": "ETC",
        "title": "Ethereum Classic",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://gastracker.io/tx/%hash%",
        "explorer_address_link": "https://gastracker.io/addr/%address%"
    },
    "nem": {
        "currency": "XEM",
        "title": "NEM",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "http://chain.nem.ninja/#/transfer/%hash%",
        "explorer_address_link": "http://chain.nem.ninja/#/account/%address%/0"
    },
    "zcash": {
        "currency": "ZEC",
        "title": "Zcash",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://zcashnetwork.info/tx/%hash%",
        "explorer_address_link": "https://zcashnetwork.info/address/%address%"
    },
    "omisego": {
        "currency": "OMG",
        "title": "OmiseGO",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://etherscan.io/tx/%hash%",
        "explorer_address_link": "https://etherscan.io/address/%address%"
    },
    "augur": {
        "currency": "REP",
        "title": "Augur",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://etherscan.io/tx/%hash%",
        "explorer_address_link": "https://etherscan.io/address/%address%"
    },
    "qtum": {
        "currency": "QTUM",
        "title": "Qtum",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://qtum.info/tx/%hash%",
        "explorer_address_link": "https://qtum.info/address/%address%"
    },
    "trueusd": {
        "currency": "TUSD",
        "title": "TrueUSD",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://etherscan.io/tx/%hash%",
        "explorer_address_link": "https://etherscan.io/address/%address%"
    },
    "usdcoin": {
        "currency": "USDC",
        "title": "USD Coin",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://etherscan.io/tx/%hash%",
        "explorer_address_link": "https://etherscan.io/address/%address%"
    },
    "paxos": {
        "currency": "PAX",
        "title": "Paxos Standard",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://etherscan.io/tx/%hash%",
        "explorer_address_link": "https://etherscan.io/address/%address%"
    },
    "zrx": {
        "currency": "ZRX",
        "title": "0x",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://etherscan.io/tx/%hash%",
        "explorer_address_link": "https://etherscan.io/address/%address%"
    },
    "chainlink": {
        "currency": "LINK",
        "title": "Chainlink",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://etherscan.io/tx/%hash%",
        "explorer_address_link": "https://etherscan.io/address/%address%"
    },
    "bat": {
        "currency": "BAT",
        "title": "Basic Attention Token",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://etherscan.io/tx/%hash%",
        "explorer_address_link": "https://etherscan.io/address/%address%"
    },
    "holo": {
        "currency": "HOT",
        "title": "Holo",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://etherscan.io/tx/%hash%",
        "explorer_address_link": "https://etherscan.io/address/%address%"
    },
    "golem": {
        "currency": "GNT",
        "title": "Golem",
        "deposit": true,
        "withdrawal": true,
        "explorer_tx_link": "https://etherscan.io/tx/%hash%",
        "explorer_address_link": "https://etherscan.io/address/%address%"
    }
}

Strukturen

Available currency codes


Type CodeCurrency CodePayment Method
bitcoin BTC
Bitcoin
xrp XRP
XRP
ethereum ETH
Ethereum
bitcoincash BCH
Bitcoin Cash
litecoin LTC
Litecoin
eos EOS
EOS
stellar XLM
Stellar
tether USDT
Tether
monero XMR
Monero
dash DASH
Dash
ethereumclassic ETC
Ethereum Classic
nem XEM
NEM
zcash ZEC
Zcash
omisego OMG
OmiseGO
augur REP
Augur
qtum QTUM
Qtum
trueusd TUSD
TrueUSD
usdcoin USDC
USD Coin
paxos PAX
Paxos Standard
zrx ZRX
0x
chainlink LINK
Chainlink
bat BAT
Basic Attention Token
holo HOT
Holo
golem GNT
Golem

Address parameters

1) Bitcoin, Tether, Litecoin, Ethereum, Dash, ZCash, Ethereum Classic:
  options = {address: BITCOINADDRESS}
  address is your cryptocurrency address.
2) Bitcoin Cash
  options = {address: BITCOINCASHADDRESS}
  address is your cryptocurrency address.
3) XRP
  options = {account: XRPACCOUNT, destination_tag: DESTTAG}
  account is your XRP account and destination_tag is Destination Tag.
4) NEM
  options = {address: XEMADDRESS, message: MESSAGE}
  address is your NEM address and message is an optional parameter if you're using shared NEM wallet.
5) Monero
  options = {address: MONEROADDRESS, payment_id: PAYMENTID}
  address if your Monero address and payment_id is an optional parameter if you're using shared Monero wallet.
6) Stellar
  options = {account: XLMACCOUNT, memo: MEMO}
  account is your Stellar account and memo is Memo.
7) EOS
  options = {account: EOSACCOUNT, memo: MEMO}
  account is your EOS account name and memo is Memo.

API Libraries / Plugins

ALFAcashier API Libraries / CMS Plugins for various programming languages.