Skip to content

Instantly share code, notes, and snippets.

View svasva's full-sized avatar

Vitaly A. Sorokin svasva

View GitHub Profile
Cx.ResetPasswordRoute = Em.Route.extend
beforeModel: (route) ->
if !@controllerFor('auth').get('isSignedIn') && !route.params.token
@transitionTo('tradeIndex')
Cx.ResetPasswordTokenRoute = Em.Route.extend
model: (params) -> params
setupController: (c, params) ->
@controllerFor('resetPassword').set 'token', params.token
# curl -H "Content-Type: application/json" -d '{"order":{"trade_pair_id":73, "amount":1000000,
"cancelled":false, "complete":false, "bid": false, "rate":111111111111100000000}}' http://localhost:3000/api/v1/orders
>>>
Started POST "/api/v1/orders" for 127.0.0.1 at 2013-12-13 01:30:05 +0400
Processing by Api::V1::OrdersController#create as JSON
Parameters: {"order"=>{"trade_pair_id"=>73, "amount"=>1000000, "cancelled"=>false,
"complete"=>false, "bid"=>false, "rate"=>430646668842690304}}
CoinEx API
# All timestamps are in UTC
# All currency amounts and exchange rates are multiplied by 10^8 to get rid of floating point numbers
# All API requests should contain HTTP header 'Content-type: application/json'
# Private API methods should have API-Key and API-Sign headers
# API-Key header should contain your API access key which can be generated
# at your account settings page
# API-Sign header should contain request's POST data signed by your account's
<?php
function api_query($http_method, $method, array $req = array()) {
$key = '';
$secret = '';
$post_data = $http_method == 'POST' ? json_encode($req) : '';
$sign = hash_hmac('sha512', $post_data, $secret);
$headers = array(
'Content-type: application/json',
{
"auto_complete_commit_on_tab": true,
"bold_folder_labels": true,
"color_scheme": "Packages/RailsCasts Colour Scheme/RailsCastsColorScheme.tmTheme",
"default_line_ending": "unix",
"ensure_newline_at_eof_on_save": true,
"fold_buttons": false,
"folder_exclude_patterns":
[
".svn",