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.alfa.cash/api/create.json
Method: POST
Data required:
{
"gate_deposit": "Example: 'bitcoin'. Gate column from Direction of the exchange",
"gate_withdrawal": "Example: 'litecoin'. Gate column from Direction of the exchange",
"pair": "[DEPRECATED] 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: '2f777791', Affiliate Program ID.",
"promo_code": "(Optional) example: 'ALFACODE'.",
"rate_type": "(Optional) example: 'fixed'. Rate type: 'fixed' or 'floating'. If not specified, defaults to 'fixed'. Floating rate is available for selected pairs and may offer better exchange rates. Returns an error if floating rate is not available for the requested pair."
}
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.alfa.cash/api/create.json \
-H "Content-Type:application/json" \
--data '{"gate_deposit":"bitcoin","gate_withdrawal":"litecoin","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.alfa.cash/api/rate.json
Method: POST
Data required:
{
"gate_deposit": "Example: 'bitcoin'. Gate column from Direction of the exchange",
"gate_withdrawal": "Example: 'litecoin'. Gate column from Direction of the exchange",
"pair": "[DEPRECATED] 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:
{
"gate_deposit": "bitcoin",
"gate_withdrawal": "litecoin",
"pair": "BTC_LTC",
"rate": "1.213456",
"rate_floating": "1.225678" // floating exchange rate, null if floating rate is not available for this pair
}
Error Output example:
{"error": "Invalid pair"}
cURL (example):
curl -X POST https://www.alfa.cash/api/rate.json \
-H "Content-Type:application/json" \
--data '{"gate_deposit": "bitcoin", "gate_withdrawal": "litecoin"}'
Response (example):
{"gate_deposit": "bitcoin", "gate_withdrawal": "litecoin", "pair": "BTC_LTC", "rate": "108.82046494", "rate_floating": null}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.alfa.cash/api/validateaddress.json
Method: POST
Data required:
{
"gate_withdrawal": "Gate", // example: "bitcoin", Direction of the exchange
"currency": "[DEPRECATED] Currency", // 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:
{
"valid": false,
"error": "Invalid payment_id"
}
cURL (example):
curl -X POST https://www.alfa.cash/api/validateaddress.json \
> -H "Content-Type:application/json" \
> --data '{"gate_withdrawal":"stellar","options":{"address":"GAKUWGKLFUDBCS2JHZUTRUPXL5Q7C3KC2XXEGLK2J6JBILD2HYBYD55H","memo":"b5db89975bc958fa"}}'
Response (example):
{"valid": true}
Promo Code Validation
Validates Promo Code for specific exchange direction (pair).
URL: https://www.alfa.cash/api/promo_code.json
Method: POST
Data required:
{
"code": "Example: 'ALFACODE'",
"gate_deposit": "Example: 'bitcoin'. Gate column from Direction of the exchange",
"gate_withdrawal": "Example: 'litecoin'. Gate column from Direction of the exchange",
"pair": "[DEPRECATED] 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.alfa.cash/api/promo_code.json \
-H "Content-Type:application/json" \
--data '{"code":"ALFACODE","gate_deposit": "bitcoin", "gate_withdrawal": "litecoin"}'
Response (example):
{"discount": "10"}