![Oracle Drags Its Feet in the JavaScript Trademark Dispute](https://cdn.sanity.io/images/cgdhsj6q/production/919c3b22c24f93884c548d60cbb338e819ff2435-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Oracle Drags Its Feet in the JavaScript Trademark Dispute
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
RubyBtce provides a simple and clean API wrapper for interfacing with the BTC-e API in a Rails app or CLI.
Add this line to your application's Gemfile:
gem 'RubyBtce'
And then execute:
$ bundle
Or install it yourself as:
$ gem install RubyBtce
Add the following file to /config
, and name it btce_api.yml
.
# /{Rails.root}/config/btce_api.yml
key: 'your_api_key'
secret: 'your_api_secret'
This gem provides class methods for all public/private API methods offered by BTC-e. All responses will be returned in a ruby hash format, closely following the structure shown in the BTC-e API documentation.
ticker
RubyBtce.ticker.btc_usd.last
=> 555.127
pair_info
RubyBtce.pair_info.btc_usd.fee
=> 0.2
depth(limit)
RubyBtce.depth(2).btc_usd.asks
=> [[554.32, 0.25], [554.329, 0.034]]
order_book(limit)
RubyBtce.order_book(2).btc_usd.first.price
=> 553
account
RubyBtce.account.funds.btc
=> 0.02199302
new_trade(opts={})
This method will take up the values for rate
and amount
in the format of a string, integer, or float. You can pass these parameters with any number of decimal places, which will automatically be cut off (not rounded) to the maximum number of places for the specific currency.
@trade = RubyBtce.new_trade("pair" => "btc_usd", "type" => "sell", "rate"=>"600", "amount"=>"0.02")
@trade.funds.btc
=> 0.00199302
@trade.order_id
=> 242304103
cancel(opts={})
@trade = RubyBtce.cancel("order_id"=>242304103)
@trade.funds.usd
=> 50.35772684
@trade.order_id
=> 242304103
orders(opts={})
@orders = RubyBtce.orders("pair" => "btc_usd")
# or for all currency pairs: #
@orders = RubyBtce.orders
@orders.each do |id, order|
id
=> 242304103
order.status
=> 0
end
trades(opts={})
@trades = RubyBtce.trades("pair" => "btc_usd")
@trades.each do |id, trade|
id
=> 35308202
trade.order_id
=> 242304103
end
transactions(opts={})
@transactions = RubyBtce.transactions("from_id" => "242304103", "end_id" => "242304103", "order" => "ASC")
@transactions.each do |id, transaction|
id
=> 56116202
transaction.desc
=> Bought 0.02 BTC from your order :order:242304103: by price 600 USD total 12 USD (-0.2%)
end
git checkout -b my-new-feature
)git commit -am 'Add some feature'
)git push origin my-new-feature
)FAQs
Unknown package
We found that RubyBtce demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.