Jump to content

PHP - TradingApiSdk Version v1


bachel
 Share

Recommended Posts

Hi

 

Könnte jemand ein Beispiel posten mit dem man in der Kombination der PHP - TradingApiSdk Version v1 einen Express verkauf starten kann also ne Sell Order ?

 

Ich wäre euch sehr Dankbar

Link to comment
Share on other sites

  • 4 weeks later...

Hi

 

ungetestet, Benutzung auf eigene Gefahr :D

<?php

require_once __DIR__.'/TradingApiSdkv1.php';

$api_key    = 'MY_API_KEY';
$api_secret = 'MY_API_SECRET';

$api = new TradingApiSdk($api_key, $api_secret);

$result = $api->doRequest(TradingApiSdk::METHOD_CREATE_ORDER, array(
    TradingApiSdk::CREATE_ORDER_PARAMETER_TYPE           => TradingApiSdk::ORDER_TYPE_SELL,
    TradingApiSdk::CREATE_ORDER_PARAMETER_PAYMENT_OPTION => TradingApiSdk::ORDER_PAYMENT_OPTION_ONLY_EXPRESS,
    TradingApiSdk::CREATE_ORDER_PARAMETER_PRICE          => 500,
    TradingApiSdk::CREATE_ORDER_PARAMETER_MAX_AMOUNT     => 0.1
));

echo '<pre>';
print_r($result);
echo '</pre>';

?>
Edited by 4ley
  • Love it 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.