The Bitinka API

什麼是the Bitinka API?

此為應用程序接口 (API) ,由BitInka提供予其他支付方式之外部應用程式與此交易平台整合

我可以怎麼利用Bitinka API?

利用Bitinka API, 您將可以查看比特幣供給量、需求量、交易歷史、建立或取消比特幣購買或售出訂單及更多。

此API提供公用及私有方式,以JSON格式接受資料或自動以XML 1.0格式UTF-8字元編碼回覆。此回復可在每個URL的最後

註冊建立金鑰以作為API使用之憑據。

創立前,前往To create it, you need to go to "錢包" > API金鑰”。您需要為每個產生唯一秘密編碼的金鑰提供認證方式;此將讓您可以進入私有功能。

範例:
金鑰: ZUMAXOZR-R78S017Q-CAS8H8TW-T52RMFSL-58HIJK4F
秘密 26n28utk4lsmumjnrlfe070bmwiprgjun7xv1q1nf424s3ldw9j52ktsgipmvrt3

PUBLIC DATA FUNCTIONS

MARKETS

Allows visualizing the available markets for the exchange.

Request
GET https://www.bitinka.com/api/apinka/markets
Returns the available markets in XML format
GET https://www.bitinka.com/api/apinka/markets?format=json
Returns the available markets in JSON format
Response (JSON)
pair The available pairs of the market
範例:BTC_ARS, BTC_BOB, BTC_BRL, BTC_CLP, BTC_CNY, BTC_COP, BTC_EUR, BTC_PEN, LTC_BTC, XRP_BTC, DASH_BTC, ACT_BTC, VEX_BTC, NEO_BTC, GAS_BTC, SSP_BTC, SSC_BTC, BTG_BTC, BCH_BTC, NANO_BTC, ETH_BTC, ETH_ARS, ETH_BOB, ETH_BRL, ETH_CLP, ETH_CNY, ETH_COP, ETH_EUR, ETH_PEN, LTC_ETH, DASH_ETH, ACT_ETH, VEX_ETH, NEO_ETH, GAS_ETH, SSP_ETH, SSC_ETH, BTG_ETH, BCH_ETH, NANO_ETH, XRP_ETH, BTC_USD, ETH_USD, DASH_USD, LTC_USD, XRP_USD, ACT_USD, VEX_USD, NEO_USD, GAS_USD, SSP_USD, SSC_USD, BTG_USD, BCH_USD, NANO_USD.

TICKER

Returns market values in the last hours, the 24H volume of each market, the last offer and the last demand.

Request
GET https://www.bitinka.com/api/apinka/ticker
Returns market values for all markets in XML format.
GET https://www.bitinka.com/api/apinka/ticker?format=json
Returns market values for all markets in JSON format.
Response (JSON)
volumen24hour Volume per market in the last 24 hours
Ask Lowest sale order
Bid Highest buy order
lastPrice Last price of each market

TICKER BROKER

Returns market values in the last hours, the 24H volume of each market, the last offer and the last demand.

GET https://www.bitinka.com/api/apinka/ticker/broker
Returns market values for all markets in XML format.
GET https://www.bitinka.com/api/apinka/ticker/broker?format=json
Returns market values for all markets in JSON format.
Response (JSON)
volumen24hour Volume per market in the last 24 hours
Ask Lowest sale order
Bid Highest buy order
lastPrice Last price of each market

TICKER PER PAIR

Returns values of a specific pair in the last hours, the volume 24H of the market, the last offer and the last demand.

Request
GET https://www.bitinka.com/api/apinka/ticker/{currency_pair}
Returns market values for all markets in XML format.
GET https://www.bitinka.com/api/apinka/ticker/{currency_pair}?format=json
Returns selected market values in JSON format.
Supported values for currency_pair:範例: BTC_ARS, BTC_BOB, BTC_BRL, BTC_CLP, BTC_CNY, BTC_COP, BTC_EUR, BTC_PEN, LTC_BTC, XRP_BTC, DASH_BTC, ACT_BTC, VEX_BTC, NEO_BTC, GAS_BTC, SSP_BTC, SSC_BTC, BTG_BTC, BCH_BTC, NANO_BTC, ETH_BTC, ETH_ARS, ETH_BOB, ETH_BRL, ETH_CLP, ETH_CNY, ETH_COP, ETH_EUR, ETH_PEN, LTC_ETH, DASH_ETH, ACT_ETH, VEX_ETH, NEO_ETH, GAS_ETH, SSP_ETH, SSC_ETH, BTG_ETH, BCH_ETH, NANO_ETH, XRP_ETH, BTC_USD, ETH_USD, DASH_USD, LTC_USD, XRP_USD, ACT_USD, VEX_USD, NEO_USD, GAS_USD, SSP_USD, SSC_USD, BTG_USD, BCH_USD, NANO_USD.
Response (JSON)
volumen24hour Volume per market in the last 24 hours
Ask Lowest sale order
Bid Highest buy order
lastPrice Last price of each market

TICKER PER BROKER PAIR

Returns values of a specific pair in the last hours, the volume 24H of the market, the last offer and the last demand.

Request
GET https://www.bitinka.com/api/apinka/ticker/broker/{pair}
Returns market values for all markets in XML format.
GET https://www.bitinka.com/api/apinka/ticker/broker/{pair}/?format=json
Returns selected market values in JSON format.
Response (JSON)
volumen24hour Volume per market in the last 24 hours
Ask Lowest sale order
Bid Highest buy order
lastPrice Last price of each market
Supported values per pair: BTC_ARS, BTC_BOB, BTC_BRL, BTC_CLP, BTC_CNY, BTC_COP,BTC_EUR, BTC_PEN, LTC_BTC, XRP_BTC, DASH_BTC, ACT_BTC, VEX_BTC, NEO_BTC, GAS_BTC, SSP_BTC, SSC_BTC, BTG_BTC, BCH_BTC, NANO_BTC, ETH_BTC, ETH_ARS, ETH_BOB, ETH_BRL, ETH_CLP, ETH_CNY, ETH_COP, ETH_EUR, ETH_PEN, LTC_ETH, DASH_ETH, ACT_ETH, VEX_ETH, NEO_ETH, GAS_ETH, _ETH, SSC_ETH, BTG_ETH, BCH_ETH, NANO_ETH, XRP_ETH, BTC_USD, ETH_USD, DASH_USD, LTC_USD, XRP_USD, ACT_USD, VEX_USD, NEO_USD, GAS_USD, SSP_USD, SSC_USD, BTG_USD, BCH_USD, NANO_USD.

ORDER BOOK

Obtains all active purchase and sale offers from the market.

Request
GET https://www.bitinka.com/api/apinka/order_book/{currency_pair}
Returns purchase and sale orders of the selected market in XML format.
GET https://www.bitinka.com/api/apinka/order_book/{currency_pair}?format=json
Returns purchase and sale orders of the selected market in JSON format.
Supported values for currency_pair: : BTC_ARS, BTC_BOB, BTC_BRL, BTC_CLP, BTC_CNY, BTC_COP, BTC_EUR, BTC_PEN, LTC_BTC, XRP_BTC, DASH_BTC, ACT_BTC, VEX_BTC, NEO_BTC, GAS_BTC, SSP_BTC, SSC_BTC, BTG_BTC, BCH_BTC, NANO_BTC, ETH_BTC, ETH_ARS, ETH_BOB, ETH_BRL, ETH_CLP, ETH_CNY, ETH_COP, ETH_EUR, ETH_PEN, LTC_ETH, DASH_ETH, ACT_ETH, VEX_ETH, NEO_ETH, GAS_ETH, SSP_ETH, SSC_ETH, BTG_ETH, BCH_ETH, NANO_ETH, XRP_ETH, BTC_USD, ETH_USD, DASH_USD, LTC_USD, XRP_USD, ACT_USD, VEX_USD, NEO_USD, GAS_USD, SSP_USD, SSC_USD, BTG_USD, BCH_USD, NANO_USD.
Response (JSON)
Returns a JSON dictionary with ’’bids’’ and ’’asks’’. Each is a list of open orders and each order is represented as a list holding the price and the amount.

PRIVATE FUNCTIONS

GET TRADE BALANCE

Obtains the trade balance of all currencies of the user’s

Request
POST https://www.bitinka.com/api/apinka/get_balance
Returns the available balance to trade in each currency in XML format.
POST https://www.bitinka.com/api/apinka/get_balance/format/json
Returns the available balance to trade in each currency in JSON format.
Request parameters
Key API Key.
secret Secret.
Example {
金鑰: JU5DC6KD-7QSP8KYQ-BM0TKL3D-LZTRVFSE-9YSM5DZC ,
秘密 3r1cc02nm3h7pkkaje2ftvu2tnpy0pb3hdgtdjh0my7birm25ohzjc2czrbzgn3x

}
Response (JSON)
coin 幣別
balance Available balance in the trade wallet

GET BALANCE

Gets the balance of the wallet of all currencies of the user.

Request
POST https://www.bitinka.com/api/apinka/get_wallet_balance
Returns the available balance of each currency in XML format.
POST https://www.bitinka.com/api/apinka/get_wallet_balance/format/json
Returns the available balance of each currency in JSON format.
Request parameters
Key API Key.
secret Secret.
Example {
金鑰: JU5DC6KD-7QSP8KYQ-BM0TKL3D-LZTRVFSE-9YSM5DZC ,
秘密 3r1cc02nm3h7pkkaje2ftvu2tnpy0pb3hdgtdjh0my7birm25ohzjc2czrbzgn3x

}
Response (JSON)
coin 幣別
balance Available balance in the trade wallet

CREATE ORDER

Create a purchase or sale offer in a specific market.

Request
POST https://www.bitinka.com/api/apinka/create_order
Create a purchase or sale order according to the type of trade, response in XML format
POST https://www.bitinka.com/api/apinka/create_order/format/json
Create a purchase or sale order according to the type of trade, response in JSON format
Request parameters
Key API Key.
secret Secret.
typeOrder “Buy” or “Sell”
price 價格
investement Quantity
firstCurrency First currency of the pair
secondCurrency Second currency of the pair
trade Type of trade, in which you want to create the order.
The types of trade are: (1) Limit, (2) Market, (5) Fill or kill
Example {
金鑰: JU5DC6KD-7QSP8KYQ-BM0TKL3D-LZTRVFSE-9YSM5DZC ,
秘密 3r1cc02nm3h7pkkaje2ftvu2tnpy0pb3hdgtdjh0my7birm25ohzjc2czrbzgn3x ,
new :
{
"typeOrder" : "sell",
"price" : "7000",
"investement" : "0.00670987",
"firstCurrency" : "BTC",
"secondCurrency" : "USD",
"trade" : 1
}

}
Response (JSON)
amount Quantity
balanceUser Balance available to the user for trading
date 日期
error True or False, for errors
firstCurrency First currency of the pair
idOrder Order ID
method Creation method
price 價格
priceMarket Price of the current market
secondCurrency Second currency of the pair
status Order status
total Total Amount = Price* Amount
typeOrder Type of order BUY or SELL
typeTrading Type of trade
username Username of the user in the system

CREATE ORDER STOP

Create a purchase or sale offer in a specific market.

Request
POST https://www.bitinka.com/api/apinka/create_order/stop
Create a purchase or sale order according to the type of trade, response in XML format
POST https://www.bitinka.com/api/apinka/create_order/stop/format/json
Create a purchase or sale order according to the type of trade, response in XML format
Request parameters
Key API Key.
secret Secret.
typeOrder “Buy” or “Sell”
priceLimit Precio en el que se creará la orden
priceStop Precio en el que se dispara la orden
investement Quantity
firstCurrency First currency of the pair
secondCurrency Second currency of the pair
trade Type of trade, in which you want to create the order.
percentage Porcentaje
Type of trade (3) Stop Unitario, (4) Stop Porcentual (%)
Example {
金鑰: JU5DC6KD-7QSP8KYQ-BM0TKL3D-LZTRVFSE-9YSM5DZC ,
秘密 3r1cc02nm3h7pkkaje2ftvu2tnpy0pb3hdgtdjh0my7birm25ohzjc2czrbzgn3x ,
new :
{
"typeOrder" : "sell",
"priceLimit" : "6500",
"priceStop" : "6400",
"investement" : "0.00670987",
"firstCurrency" : "BTC",
"secondCurrency" : "USD",
"trade" : 4,
"percentage" : 10
}

}
Response (JSON)
amount Quantity
balanceUser Balance available to the user for trading
date 日期
error True or False, for errors
firstCurrency First currency of the pair
idOrder Order ID
method Creation method
price 價格
priceMarket Price of the current market
secondCurrency Second currency of the pair
status Order status
total Total Amount = Price* Amount
typeOrder Type of order BUY or SELL
typeTrading Type of trade
username Username of the user in the system

ADD ORDER BROKER

Make a purchase or sale in a specific market, instantly.

Request
POST https://www.bitinka.com/api/apinka/addOrderbroker
Make an instant purchase or sale, response in XML format.
POST https://www.bitinka.com/api/apinka/addOrderbroker/format/json
Make an instant purchase or sale, response in JSON format.
Request parameters
Key API Key.
secret Secret.
firstCurrency First currency of the pair
secondCurrency Second currency of the pair
amount Quantity
type “Buy” or “Sell”
Example {
金鑰: JU5DC6KD-7QSP8KYQ-BM0TKL3D-LZTRVFSE-9YSM5DZC ,
秘密 3r1cc02nm3h7pkkaje2ftvu2tnpy0pb3hdgtdjh0my7birm25ohzjc2czrbzgn3x ,
new :
{
"firstCurrency" : "BTC",
"secondCurrency" : "USD",
"amount" : "0.00670987",
"type" : "sell"
}

}
Response (JSON)
return Response for the petition
status Order status
order_id Order ID
price 價格

CANCEL ORDER

Cancel a purchase or sale order in a specific market or by ID.

Request
POST https://www.bitinka.com/api/apinka/cancel_order
Cancel one or more orders and return the balance, response in XML format.
POST https://www.bitinka.com/api/apinka/cancel_order/format/json
Cancel one or more orders and return the balance, response in JSON format.
Request parameters
Key API Key.
secret Secret.
pair Cancel all orders of the pair.
Request parameters v2
Key API Key.
secret Secret.
id Cancel all orders according to ID.
Example {
金鑰: JU5DC6KD-7QSP8KYQ-BM0TKL3D-LZTRVFSE-9YSM5DZC ,
秘密 3r1cc02nm3h7pkkaje2ftvu2tnpy0pb3hdgtdjh0my7birm25ohzjc2czrbzgn3x ,
pair: BTC_USD

}


o

{
金鑰: JU5DC6KD-7QSP8KYQ-BM0TKL3D-LZTRVFSE-9YSM5DZC ,
秘密 3r1cc02nm3h7pkkaje2ftvu2tnpy0pb3hdgtdjh0my7birm25ohzjc2czrbzgn3x ,
id: 35678

}
Response (JSON)
balance User's updated balance
cancellationDate Cancellation date
coin 幣別
creationDate Creation date
error True or False, for errors
idOrder Order ID
investement Quantity
status Estatus
typeOrder Type of order BUY or SELL
username Username del usuario

ORDERS USER

History of active orders of purchase or sale of the user by type of trade.

Request
POST https://www.bitinka.com/api/apinka/orders_user
Returns the history of active orders of the user, response in XML format.
POST https://www.bitinka.com/api/apinka/orders_user/format/json
Returns the history of active orders of the user, response in JSON format.
Request parameters
Key API Key.
secret Secret.
firstCurrency First currency of the pair
secondCurrency Second currency of the pair
trade Type of trade
The types of trade are: (1) Limit,(3) Stop Unitario, (4) Stop Porcentual (%)
Example {
金鑰: JU5DC6KD-7QSP8KYQ-BM0TKL3D-LZTRVFSE-9YSM5DZC ,
秘密 3r1cc02nm3h7pkkaje2ftvu2tnpy0pb3hdgtdjh0my7birm25ohzjc2czrbzgn3x ,
firstCurrency : "BTC",
secondCurrency : "USD",
trade: "1"

}
Response (JSON)
order_id Order ID
fromCurrency First currency of the pair
toCurrency Second currency of the pair
Type Type of order BUY or SELL
Price 價格
Amount Quantity
Total Total Amount = Price* Amount
datetime Creation date
status Order status

TRADE HISTORY

History of completed transactions of the user. You can view the current and previous orders.

Request
POST https://www.bitinka.com/api/apinka/trade_history
Returns history of completed orders of the user, response in XML format.
POST https://www.bitinka.com/api/apinka/trade_history/format/json
Returns history of completed orders of the user, response in JSON format.
Request parameters
Key API Key.
secret Secret.
firstCurrency First currency of the pair
secondCurrency Second currency of the pair
Example {
金鑰: JU5DC6KD-7QSP8KYQ-BM0TKL3D-LZTRVFSE-9YSM5DZC ,
秘密 3r1cc02nm3h7pkkaje2ftvu2tnpy0pb3hdgtdjh0my7birm25ohzjc2czrbzgn3x ,
firstCurrency: "BTC",
secondCurrency: "USD"

}
Response (JSON)
trade_id Order ID
fromCurrency First currency of the pair
toCurrency Second currency of the pair
Amount Quantity
Price 價格
Type Type of order BUY or SELL
Fee Fee amount
Total Total Amount = Price* Amount
datetime Date and time of creation
status Order status

ORDERS CANCELLED

History of completed transactions of the user. You can view the current and previous orders.

Request
POST https://www.bitinka.com/api/apinka/orders_cancelled
Returns history of canceled orders of the user, response in XML format.
POST https://www.bitinka.com/api/apinka/orders_cancelled/format/json
Returns history of canceled orders of the user, response in JSON format.
Request parameters
Key API Key.
secret Secret.
trade Type of trade
Example {
金鑰: JU5DC6KD-7QSP8KYQ-BM0TKL3D-LZTRVFSE-9YSM5DZC ,
秘密 3r1cc02nm3h7pkkaje2ftvu2tnpy0pb3hdgtdjh0my7birm25ohzjc2czrbzgn3x ,
trade: "1"
}
Response (JSON)
order_id Order ID
fromCurrency First currency of the pair
toCurrency Second currency of the pair
Type Type of order BUY or SELL
Price 價格
Amount Quantity
Total Total Amount = Price* Amount
status Order status