API access to our platform with JSON responses.

Examples:


Public Methods

Ticker
GET https://www.bit2c.co.il/Exchanges/[BtcNis/LtcBtc/LtcNis]/Ticker.json 

Params:none.

Returns JSON dictionary:

  • ll - last price
  • av - last 24 hours price avarage
  • a - last 24 hours volume
  • h - highest buy order
  • l - lowest sell order

Order book
GET https://www.bit2c.co.il/Exchanges/[BtcNis/LtcBtc/LtcNis]/orderbook.json 

Params:none.

Returns JSON dictionary with "bids" and "asks". Each is a list of open orders and each order is represented as a list of price and amount.

  • {"asks":[[price,amount],[price,amount]...],"bids":[[price,amount],[price,amount]...]}

Transactions (closed trades)
GET https://www.bit2c.co.il/Exchanges/[BtcNis/LtcBtc/LtcNis]/trades.json 

Params:

  • since - return transactions for the last 'tid'. Default: -6 months.
    Example: https://www.bit2c.co.il/Exchanges/BtcNis/trades.json?since=200 will return transactions from the tid 200.

Returns descending JSON list of transactions. Every transaction (dictionary) contains:

  • date - unix timestamp date and time
  • tid - transaction id
  • price
  • amount


Authenticated Private Methods


Authenticated methods require the use of an api key (in your API settings ) and can only be accessed via the POST method.
Authorization is performed by sending the following variables into the request header:
  1. Key — Public API key. An example API key: 692036b-23b9-48c7-aedf-17db72e23a5b
  2. Sign — ALL POST data (param=val&param1=val1&nonce=(number)) signed by a secret key according to HMAC-SHA512 method. Your secret key (upper case) and public keys can be generated from your account settings page.
  3. An additional security element must be passed into the post:
    nonce - All requests must also include a special nonce POST parameter with incrementing integer. The integer must always be greater than the previous requests nonce value. (example :DateTime.UtcNow.Ticks)
  4. Content-Type can't be left out but must be application/x-www-form-urlencoded.

Balance - Read method
POST https://www.bit2c.co.il/Account/Balance 

Params:none.

Returns json object:

  • BalanceBTC - account BTC balance
  • BalanceLTC - account LTC balance
  • BalanceNIS - account NIS balance


Balance - Read method
POST https://www.bit2c.co.il/Account/Balance/v2 

Params:none.

Returns json object:

  • BTC - account BTC balance
  • LTC - account LTC balance
  • NIS - account NIS balance
  • Fee - account trade fee
  • TradeVolume - account personal Trade Volume
  • TotalTradeVolume - personal + affiliated Trade Volume

Get my orders - Read method
POST https://www.bit2c.co.il/Order/MyOrders 

Params:

  • pair - [BtcNis/LtcBtc/LtcNis]

Returns json object:

  • bids array
  • asks array
  • * bid & ask object is:{d:[date created],s:[status],a:[amount],p:[price],pair:[pair],id:[save this to cancel order]}

Account History - Read method
POST https://www.bit2c.co.il/Order/AccountHistory 

Params:

  • fromTime - date format "dd/MM/yyyy HH:mm:ss.fff"
  • toTime - date format "dd/MM/yyyy HH:mm:ss.fff"

Returns json object:

  • AccountRaw array
  • *AccountRaw object is:
    decimal BalanceBTC
    decimal BalanceLTC
    decimal BalanceNIS
    decimal? BTC
    decimal? LTC
    decimal? NIS
    DateTime Created
    decimal? Fee
    decimal? FeeInNIS
    long id
    DateTime? OrderCreated
    decimal? PricePerCoin
    string Ref
    int TypeId

Add Order - Write method
POST https://www.bit2c.co.il/Order/AddOrder 

Params:

  • Amount - decimal
  • Price - decimal
  • Total - decimal
  • IsBid - (bool)[true/false]
  • Pair - [BtcNis/LtcBtc/LtcNis]

Returns json object:

  • OrderResponse - {HasError:[true/false],Error:[string]}
  • NewOrder - {d:[date created],t:[type sell/buy],s:[status],a:[amount],p:[price],p1:[pair],id:[save this to cancel order],aa:[account action type]}

Cancel order - Write method
POST https://www.bit2c.co.il/Order/CancelOrder 

Params:

  • id - order id

Returns json object:

  • bool HasError - [true/false]
  • string Error - error message string

Add Buy Order market price - Write method
POST https://www.bit2c.co.il/Order/AddOrderMarketPriceBuy 

Params:

  • Total - decimal
  • Pair - [BtcNis/LtcBtc/LtcNis]

Returns json object:

  • OrderResponse - {HasError:[true/false],Error:[string]}
  • NewOrder - {d:[date created],t:[type sell/buy],s:[status],a:[amount],p:[price],p1:[pair],id:[save this to cancel order],aa:[account action type]}

Add Sell Order market price - Write method
POST https://www.bit2c.co.il/Order/AddOrderMarketPriceSell 

Params:

  • Amount - decimal
  • Pair - [BtcNis/LtcBtc/LtcNis]

Returns json object:

  • OrderResponse - {HasError:[true/false],Error:[string]}
  • NewOrder - {d:[date created],t:[type sell/buy],s:[status],a:[amount],p:[price],p1:[pair],id:[save this to cancel order],aa:[account action type]}


Merchants -All Write method


Create checkout button id
POST https://www.bit2c.co.il/Merchant/CreateCheckout 

Params:


  • decimal Price
    string Description
    CoinType CoinType[Btc/Ltc] .
    string ReturnURL
    string CancelURL
    bool NotifyByEmail
    int Autosale (% auto sell bitcoin)

Returns json object:


  • string error
    Guid id - use thid to create link for payment https://www.bit2c.co.il/payment/Details/[id]

Add Coin Request
POST https://www.bit2c.co.il/Order/AddCoinFundsRequest 

Params:


  • decimal total
    CoinType Coin[Btc/Ltc] .

Returns address for deposit


  • string address - valid for 24H

Add Fund Request - for fiat money
POST https://www.bit2c.co.il/Order/AddFund 

Params:


  • decimal Total
    string Reference
    bool IsDeposit

Returns message


  • string message - AddFundsSuccess/AddFundsError

Get my paymentId - to use when asking for payments
POST https://www.bit2c.co.il/Payment/GetMyId 

Params:

  • none

Returns message


  • Guid paymentId

Send payment
POST https://www.bit2c.co.il/Payment/Send 

Params:

  • Guid payTo
    decimal Total
    CoinType BTC.

Returns message

  • string reff
    string error