Skip to content

Instantly share code, notes, and snippets.

@Radzhab
Created December 14, 2015 20:20
Show Gist options
  • Save Radzhab/9410397f416ca5bb2063 to your computer and use it in GitHub Desktop.
Save Radzhab/9410397f416ca5bb2063 to your computer and use it in GitHub Desktop.
var mt = PhpStrings.Explode(" ", PhpDateTime.MicroTime());
var NONCE = mt[1].ToString() + PhpStrings.Substring(mt[0], 2, 6); //unixTimestamp.ToString();//
var Key = "K-118c9ea0493dd2dfdede8ad7b5e2e74cd4f5dcf1";
var secret = "S-cf324dce5d87475dfd61cba02ecf89d725058b86";
var myParameters = "nonce=" + NONCE + "&pair=BTC_USD&quantity=10&price=10&type=buy";
var url = "https://api.exmo.com/v1/order_create";
var Sign = Hash(myParameters, secret);
using (WebClient webClient = new WebClient())
{
webClient.Headers[HttpRequestHeader.ContentType] = "application/x-www-form-urlencoded";
webClient.Headers.Add("User-Agent", "Mozilla/4.0 (compatible; PHP client; Windows NT; PHP/5.6.15)");
ServicePointManager.Expect100Continue = false;
webClient.Headers.Add("Sign", Sign);
webClient.Headers.Add("Key", Key);
var data = webClient.UploadString(url,myParameters);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment