/****************************************************************************** * Copyright © 2014-2016 The SuperNET Developers. * * * * See the AUTHORS, DEVELOPER-AGREEMENT and LICENSE files at * * the top-level directory of this distribution for the individual copyright * * holder information and the developer policies on copyright and licensing. * * * * Unless otherwise agreed in a custom licensing agreement, no part of the * * SuperNET software, including this file may be copied, modified, propagated * * or distributed except according to the terms contained in the LICENSE file * * * * Removal or modification of this copyright notice is prohibited. * * * ******************************************************************************/ #define EXCHANGE_NAME "bitcoin" #define UPDATE bitcoin ## _price #define SUPPORTS bitcoin ## _supports #define SIGNPOST bitcoin ## _signpost #define TRADE bitcoin ## _trade #define ORDERSTATUS bitcoin ## _orderstatus #define CANCELORDER bitcoin ## _cancelorder #define OPENORDERS bitcoin ## _openorders #define TRADEHISTORY bitcoin ## _tradehistory #define BALANCES bitcoin ## _balances #define PARSEBALANCE bitcoin ## _parsebalance #define WITHDRAW bitcoin ## _withdraw #define CHECKBALANCE bitcoin ## _checkbalance #define ALLPAIRS bitcoin ## _allpairs #define FUNCS bitcoin ## _funcs #define BASERELS bitcoin ## _baserels static char *BASERELS[][2] = { {"btc","nxt"}, {"btc","btcd"}, {"btc","ltc"}, {"btc","vrc"}, {"btc","doge"} }; #include "exchange_supports.h" double UPDATE(struct exchange_info *exchange,char *base,char *rel,struct exchange_quote *quotes,int32_t maxdepth,double commission,cJSON *argjson,int32_t invert) { char url[1024],lrel[16],lbase[16]; strcpy(lrel,rel), strcpy(lbase,base); tolowercase(lrel), tolowercase(lbase); sprintf(url,"http://api.quadrigacx.com/v2/order_book?book=%s_%s",lbase,lrel); return(exchanges777_standardprices(exchange,commission,base,rel,url,quotes,0,0,maxdepth,0,invert)); } cJSON *SIGNPOST(void **cHandlep,int32_t dotrade,char **retstrp,struct exchange_info *exchange,char *payload,char *path) { if ( retstrp != 0 ) *retstrp = clonestr("{\"error\":\"bitcoin is not yet\"}"); return(cJSON_Parse("{}")); } char *PARSEBALANCE(struct exchange_info *exchange,double *balancep,char *coinstr,cJSON *argjson) { return(clonestr("{\"error\":\"bitcoin is not yet\"}")); } cJSON *BALANCES(struct exchange_info *exchange,cJSON *argjson) { return(cJSON_Parse("{\"error\":\"bitcoin is not yet\"}")); } uint64_t TRADE(int32_t dotrade,char **retstrp,struct exchange_info *exchange,char *base,char *rel,int32_t dir,double price,double volume,cJSON *argjson) { return(0); } char *ORDERSTATUS(struct exchange_info *exchange,uint64_t quoteid,cJSON *argjson) { return(clonestr("{\"error\":\"bitcoin is not yet\"}")); } char *CANCELORDER(struct exchange_info *exchange,uint64_t quoteid,cJSON *argjson) { return(clonestr("{\"error\":\"bitcoin is not yet\"}")); } char *OPENORDERS(struct exchange_info *exchange,cJSON *argjson) { return(clonestr("{\"error\":\"bitcoin is not yet\"}")); } char *TRADEHISTORY(struct exchange_info *exchange,cJSON *argjson) { return(clonestr("{\"error\":\"bitcoin is not yet\"}")); } char *WITHDRAW(struct exchange_info *exchange,char *base,double amount,char *destaddr,cJSON *argjson) { return(clonestr("{\"error\":\"bitcoin is not yet\"}")); } struct exchange_funcs bitcoin_funcs = EXCHANGE_FUNCS(bitcoin,EXCHANGE_NAME); #include "exchange_undefs.h"