source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_margin_asset_details.rb
Ruby
mit
45
master
1,023
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Convert, '#sub_account_margin_asset_details' do let(:path) { '/sapi/v1/managed-subaccount/marginAsset' } let(:body) { fixture('response.json') } let(:status) { 200 } before do mocking_signature_and_ts(**params) stub_bin...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_margin_account_spec.rb
Ruby
mit
45
master
850
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#sub_account_margin_account' do let(:path) { '/sapi/v1/sub-account/margin/account' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) do { email: 'alice@test.com' } end be...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_status_sepc.rb
Ruby
mit
45
master
595
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#sub_account_status' do let(:path) { '/sapi/v1/sub-account/status' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) do { email: 'alice@test.com' } end before do mock...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_futures_asset_details.rb
Ruby
mit
45
master
1,034
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Convert, '#sub_account_futures_asset_details' do let(:path) { '/sapi/v1/managed-subaccount/fetch-future-asset' } let(:body) { fixture('response.json') } let(:status) { 200 } before do mocking_signature_and_ts(**params) ...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_transfer_log.rb
Ruby
mit
45
master
1,590
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Convert, '#sub_account_transfer_log' do let(:path) { '/sapi/v1/managed-subaccount/queryTransLogForTradeParent' } let(:body) { fixture('response.json') } let(:status) { 200 } before do mocking_signature_and_ts(**params) ...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_margin_account_summary_spec.rb
Ruby
mit
45
master
614
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#sub_account_margin_account_summary' do let(:path) { '/sapi/v1/sub-account/margin/accountSummary' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) { {} } before do mocking_signature...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/get_sub_account_spot_summary_spec.rb
Ruby
mit
45
master
860
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#get_sub_account_spot_summary' do let(:path) { '/sapi/v1/sub-account/spotSummary' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) { {} } before do mocking_signature_and_ts(**params...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/universal_transfer_spec.rb
Ruby
mit
45
master
1,346
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#universal_transfer' do let(:path) { '/sapi/v1/sub-account/universalTransfer' } let(:body) { fixture('response.json') } let(:status) { 200 } before do mocking_signature_and_ts(**params) stub_binance_sign_re...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_futures_account_spec.rb
Ruby
mit
45
master
1,082
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#sub_account_futures_account' do let(:path) { '/sapi/v2/sub-account/futures/account' } let(:body) { fixture('response.json') } let(:status) { 200 } before do mocking_signature_and_ts(**params) stub_binance_...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_list.rb
Ruby
mit
45
master
490
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Convert, '#sub_account_list' do let(:path) { '/sapi/v1/managed-subaccount/info' } let(:body) { fixture('response.json') } let(:status) { 200 } before do stub_binance_sign_request(:get, path, status, body) end it 'shoul...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_deposit_history_spec.rb
Ruby
mit
45
master
994
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#sub_account_deposit_history' do let(:path) { '/sapi/v1/capital/deposit/subHisrec' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) do { email: 'alice@test.com', coin: 'BNB...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_enable_options.rb
Ruby
mit
45
master
987
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Convert, '#sub_account_enable_options' do let(:path) { '/sapi/v1/sub-account/eoptions/enable' } let(:body) { fixture('response.json') } let(:status) { 200 } before do mocking_signature_and_ts(**params) stub_binance_sign...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_enable_margin_spec.rb
Ruby
mit
45
master
842
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#sub_account_enable_margin' do let(:path) { '/sapi/v1/sub-account/margin/enable' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) do { email: 'alice@test.com' } end befo...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/get_sub_account_assets_v4.rb
Ruby
mit
45
master
968
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Convert, '#get_sub_account_assets_v4' do let(:path) { '/sapi/v4/sub-account/assets' } let(:body) { fixture('response.json') } let(:status) { 200 } before do mocking_signature_and_ts(**params) stub_binance_sign_request(:...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/withdraw_from_sub_account_spec.rb
Ruby
mit
45
master
1,166
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#withdraw_from_sub_account' do let(:path) { '/sapi/v1/managed-subaccount/withdraw' } let(:body) { fixture('response.json') } let(:status) { 200 } before do mocking_signature_and_ts(**params) stub_binance_si...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_futures_account_summary_spec.rb
Ruby
mit
45
master
884
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#sub_account_futures_account_summary' do let(:path) { '/sapi/v2/sub-account/futures/accountSummary' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) { { futuresType: 1 } } before do ...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/get_sub_account_list_spec.rb
Ruby
mit
45
master
813
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#get_sub_account_list' do let(:path) { '/sapi/v1/sub-account/list' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) { {} } before do mocking_signature_and_ts(**params) stub_bina...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_futures_position_risk_spec.rb
Ruby
mit
45
master
1,099
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#sub_account_futures_position_risk' do let(:path) { '/sapi/v2/sub-account/futures/positionRisk' } let(:body) { fixture('response.json') } let(:status) { 200 } before do mocking_signature_and_ts(**params) st...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/deposit_to_sub_account_spec.rb
Ruby
mit
45
master
1,141
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#deposit_to_sub_account' do let(:path) { '/sapi/v1/managed-subaccount/deposit' } let(:body) { fixture('response.json') } let(:status) { 200 } before do mocking_signature_and_ts(**params) stub_binance_sign_r...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_futures_transfer_spec.rb
Ruby
mit
45
master
1,256
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#sub_account_futures_transfer' do let(:path) { '/sapi/v1/sub-account/futures/transfer' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) do { email: 'alice@test.com', asset:...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/get_sub_account_spot_transfer_history_spec.rb
Ruby
mit
45
master
914
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#get_sub_account_spot_transfer_history' do let(:path) { '/sapi/v1/sub-account/sub/transfer/history' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) { {} } before do mocking_signatu...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/get_sub_account_assets_spec.rb
Ruby
mit
45
master
815
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#get_sub_account_assets' do let(:path) { '/sapi/v3/sub-account/assets' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) { { email: 'alice@test.com' } } before do mocking_signature_a...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_asset_details_spec.rb
Ruby
mit
45
master
838
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#sub_account_asset_details' do let(:path) { '/sapi/v1/managed-subaccount/asset' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) { { email: 'alice@test.com' } } before do mocking_si...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_transfer_sub_account_history_spec.rb
Ruby
mit
45
master
795
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#sub_account_transfer_sub_account_history' do let(:path) { '/sapi/v1/sub-account/transfer/subUserHistory' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) do { asset: 'BNB', ...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_margin_transfer_spec.rb
Ruby
mit
45
master
1,252
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#sub_account_margin_transfer' do let(:path) { '/sapi/v1/sub-account/margin/transfer' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) do { email: 'alice@test.com', asset: '...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_transaction_statistics.rb
Ruby
mit
45
master
1,027
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Convert, '#sub_account_transaction_statistics' do let(:path) { '/sapi/v1/sub-account/transaction-statistics' } let(:body) { fixture('response.json') } let(:status) { 200 } before do mocking_signature_and_ts(**params) st...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_enable_futures_spec.rb
Ruby
mit
45
master
846
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#sub_account_enable_futures' do let(:path) { '/sapi/v1/sub-account/futures/enable' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) do { email: 'alice@test.com' } end be...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/create_virtual_sub_account_spec.rb
Ruby
mit
45
master
885
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#create_virtual_sub_account' do let(:path) { '/sapi/v1/sub-account/virtualSubAccount' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) { { subAccountString: 'virtualAccount' } } before ...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_transfer_to_master_spec.rb
Ruby
mit
45
master
1,284
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#sub_account_transfer_to_master' do let(:path) { '/sapi/v1/sub-account/transfer/subToMaster' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) do { asset: 'BNB', amount: 1 ...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_transfer_log_sub_account.rb
Ruby
mit
45
master
1,422
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Convert, '#sub_account_transfer_log_sub_account' do let(:path) { '/sapi/v1/managed-subaccount/query-trans-log' } let(:body) { fixture('response.json') } let(:status) { 200 } before do mocking_signature_and_ts(**params) ...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/get_sub_account_futures_transfer_history_spec.rb
Ruby
mit
45
master
1,139
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#get_sub_account_futures_transfer_history' do let(:path) { '/sapi/v1/sub-account/futures/internalTransfer' } let(:body) { fixture('response.json') } let(:status) { 200 } before do mocking_signature_and_ts(**par...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_futures_internal_transfer_spec.rb
Ruby
mit
45
master
1,586
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#sub_account_futures_internal_transfer' do let(:path) { '/sapi/v1/sub-account/futures/internalTransfer' } let(:body) { fixture('response.json') } let(:status) { 200 } before do mocking_signature_and_ts(**params...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/universal_transfer_history_spec.rb
Ruby
mit
45
master
864
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#universal_transfer_history' do let(:path) { '/sapi/v1/sub-account/universalTransfer' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) { {} } before do mocking_signature_and_ts(**pa...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_transfer_to_sub_spec.rb
Ruby
mit
45
master
1,703
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#sub_account_transfer_to_sub' do let(:path) { '/sapi/v1/sub-account/transfer/subToSub' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) do { toEmail: 'alice@test.com', asse...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
spec/binance/spot/subaccount/sub_account_deposit_address_spec.rb
Ruby
mit
45
master
1,136
# frozen_string_literal: true require 'spec_helper' RSpec.describe Binance::Spot::Subaccount, '#sub_account_deposit_address' do let(:path) { '/sapi/v1/capital/deposit/subAddress' } let(:body) { fixture('response.json') } let(:status) { 200 } let(:params) do { email: 'alice@test.com', coin: 'BN...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/error.rb
Ruby
mit
45
master
809
# frozen_string_literal: true module Binance class Error < StandardError; end # Client error from 400 - 499 class ClientError < Error attr_reader :response def initialize(response = nil) @response = response super(response) end end # Server side error for 5xx class ServerError < ...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/websocket_base.rb
Ruby
mit
45
master
2,087
# frozen_string_literal: true require 'logger' require 'websocket-eventmachine-client' module Binance # Base Websocket class WebSocketBase def initialize(options = {}) @logger = options[:logger] || Logger.new($stdout) @base_url = options[:base_url] @ws_connection = nil end def creat...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/authentication.rb
Ruby
mit
45
master
796
# frozen_string_literal: true require 'openssl' require 'base64' module Binance # Authentication response to API key and signature class Authentication attr_accessor :key, :secret, :private_key, :private_key_pass_phrase def initialize(key, secret, private_key = nil, private_key_pass_phrase = nil) @...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/session.rb
Ruby
mit
45
master
3,228
# frozen_string_literal: true require 'faraday' require 'binance/utils/faraday/middleware' require 'binance/utils/faraday/custom_params_encoder' module Binance # Session has the http request connection class Session include Binance::Utils::Faraday::Middleware def initialize(options = {}) @base_url ...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/spot.rb
Ruby
mit
45
master
1,419
# frozen_string_literal: true require 'binance/session' require 'binance/authentication' require 'binance/utils/validation' require 'binance/utils/url' require 'binance/error' require 'binance/spot/c2c' require 'binance/spot/convert' require 'binance/spot/fiat' require 'binance/spot/loan' require 'binance/spot/margin'...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/spot/market.rb
Ruby
mit
45
master
11,109
# frozen_string_literal: true module Binance class Spot # This module includes all spot public endpoints, including: # - server time # - kline # - ticker # - trades # - orderbook # - etc # @see https://developers.binance.com/docs/binance-spot-api-docs/rest-api/public-api-endpoints#mar...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/spot/mining.rb
Ruby
mit
45
master
10,128
# frozen_string_literal: true module Binance class Spot # Mining endpoints # The endpoints below allow to interact with Binance Pool. # @see https://developers.binance.com/docs/mining/Introduction module Mining # Acquiring Algorithm (MARKET_DATA) # # GET /sapi/v1/mining/pub/algoList...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/spot/margin.rb
Ruby
mit
45
master
27,401
# frozen_string_literal: true module Binance class Spot # Margin endpoints # @see https://developers.binance.com/docs/margin_trading/Introduction module Margin # Get All Margin Assets (MARKET_DATA) # # GET /sapi/v1/margin/allAssets # # @see https://developers.binance.com/doc...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/spot/subaccount.rb
Ruby
mit
45
master
36,352
# frozen_string_literal: true module Binance class Spot # all sub-account endpoints # @see https://developers.binance.com/docs/sub_account/Introduction module Subaccount # Create a Virtual Sub-account(For Master Account) # # POST /sapi/v1/sub-account/virtualSubAccount # # Th...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/spot/websocket.rb
Ruby
mit
45
master
7,684
# frozen_string_literal: true require 'binance/websocket_base' module Binance class Spot # Spot Websocket class WebSocket < WebSocketBase BASE_URL = 'wss://stream.binance.com:9443' def initialize(options = {}) @base_url = options[:base_url] || BASE_URL options[:base_url] = @base...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/spot/stream.rb
Ruby
mit
45
master
1,828
# frozen_string_literal: true module Binance class Spot # User data stream endpoints # @see https://developers.binance.com/docs/binance-spot-api-docs/user-data-stream module Stream # Create a ListenKey (USER_STREAM) # # POST /api/v3/userDataStream def new_listen_key @sessi...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/spot/loan.rb
Ruby
mit
45
master
11,481
# frozen_string_literal: true module Binance class Spot # all loan endpoints # @see https://developers.binance.com/docs/crypto_loan/Introduction module Loan # Get Flexible Loan Collateral Assets Data (USER_DATA) # # GET /sapi/v2/loan/flexible/collateral/data # # @param kwarg...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/spot/wallet.rb
Ruby
mit
45
master
18,357
# frozen_string_literal: true module Binance class Spot # all wallet endpoints # @see https://developers.binance.com/docs/wallet/introduction module Wallet # System Status (System) # # GET /sapi/v1/system/status # # Fetch system status. # # @see https://developer...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/spot/trade.rb
Ruby
mit
45
master
18,246
# frozen_string_literal: true module Binance class Spot # This module includes all spot trading methods, including: # - place orders (spot and oco) # - query orders (spot and oco) # - cancel orders (spot and oco) # - account information # - my trades # @see https://developers.binance.com/...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/spot/convert.rb
Ruby
mit
45
master
7,087
# frozen_string_literal: true module Binance class Spot # Convert endpoints # @see https://developers.binance.com/docs/convert/Introduction module Convert # List All Convert Pairs # # GET /sapi/v1/convert/exchangeInfo # # @param kwargs [Hash] # @option kwargs [String] ...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/spot/c2c.rb
Ruby
mit
45
master
934
# frozen_string_literal: true module Binance class Spot # C2C endpoints # @see https://developers.binance.com/docs/c2c/Introduction module C2C # Get C2C Trade History (USER_DATA) # # GET /sapi/v1/c2c/orderMatch/listUserOrderHistory # # @param tradeType [String] # @opti...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/spot/fiat.rb
Ruby
mit
45
master
2,209
# frozen_string_literal: true module Binance class Spot # Fiat endpoints # @see https://developers.binance.com/docs/fiat/Introduction module Fiat # Get Fiat Deposit/Withdraw History (USER_DATA) # # GET /sapi/v1/fiat/orders # # @param transactionType [String] 0-deposit,1-with...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/spot/simple_earn.rb
Ruby
mit
45
master
19,222
# frozen_string_literal: true module Binance class Spot # all wallet endpoints # @see https://developers.binance.com/docs/simple_earn/Introduction module SimpleEarn # Get Simple Earn Flexible Product List (USER_DATA) # # GET /sapi/v1/simple-earn/flexible/list # # @param kwar...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/utils/url.rb
Ruby
mit
45
master
528
# frozen_string_literal: true module Binance module Utils # Url Utils module Url module_function def build_query(params) params.map do |key, value| if value.is_a?(Array) value.map { |v| "#{key}=#{v}" }.join('&') else "#{key}=#{value}" ...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/utils/validation.rb
Ruby
mit
45
master
669
# frozen_string_literal: true module Binance module Utils # Client side validation class Validation class << self def require_param(param_name, param_value) raise Binance::RequiredParameterError.new(param_name, param_value) if invalid?(param_value) end def invalid?(pa...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/utils/faraday/custom_params_encoder.rb
Ruby
mit
45
master
2,314
# frozen_string_literal: true require 'date' module Binance module Utils module Faraday # Custom parameter encoder module CustomParamsEncoder class << self extend Forwardable def_delegators :'Faraday::Utils', :escape, :unescape end def self.encode(params)...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/utils/faraday/middleware/rsa_signature.rb
Ruby
mit
45
master
393
# frozen_string_literal: true require 'openssl' require 'base64' module Binance module Utils module Faraday module Middleware RSASignature = Struct.new(:app, :auth) do def call(env) env.url.query = Url.add_param(env.url.query, 'signature', auth.rsa_sign(env.url.query)) ...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/utils/faraday/middleware/hmac_signature.rb
Ruby
mit
45
master
395
# frozen_string_literal: true require 'openssl' require 'base64' module Binance module Utils module Faraday module Middleware HMACSignature = Struct.new(:app, :auth) do def call(env) env.url.query = Url.add_param(env.url.query, 'signature', auth.hmac_sign(env.url.query)) ...
github
binance/binance-connector-ruby
https://github.com/binance/binance-connector-ruby
lib/binance/utils/faraday/middleware/timestamp.rb
Ruby
mit
45
master
390
# frozen_string_literal: true require 'date' module Binance module Utils module Faraday module Middleware Timestamp = Struct.new(:app) do def call(env) env.url.query = Url.add_param( env.url.query, 'timestamp', DateTime.now.strftime('%Q') ) ...
github
diowa/ruby2-rails5-bootstrap-heroku
https://github.com/diowa/ruby2-rails5-bootstrap-heroku
Gemfile
Ruby
bsd-2-clause
45
main
1,975
# frozen_string_literal: true source 'https://rubygems.org' git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby '2.6.10' gem 'rails', '5.2.8.1' # Use postgresql as the database for Active Record gem 'pg', '~> 1.4.6' # Use Puma as the app server gem 'puma', '~> 6.4' # Transpile app-like JavaScript....
github
diowa/ruby2-rails5-bootstrap-heroku
https://github.com/diowa/ruby2-rails5-bootstrap-heroku
lib/tasks/yarn_linters.rake
Ruby
bsd-2-clause
45
main
967
# frozen_string_literal: true namespace :yarn do # rubocop:disable Rails/RakeEnvironment task :run, %i[command] do |_, args| # Install only production deps when for not usual envs. valid_node_envs = %w[test development production] node_env = ENV.fetch('NODE_ENV') do valid_node_envs.include?(Rails...
github
diowa/ruby2-rails5-bootstrap-heroku
https://github.com/diowa/ruby2-rails5-bootstrap-heroku
app/helpers/application_helper.rb
Ruby
bsd-2-clause
45
main
355
# frozen_string_literal: true module ApplicationHelper def page_title(title) content_for(:title) { title.to_s } end def page_meta_description(meta_description) content_for(:meta_description) { meta_description.to_s } end def yield_or_default(section, default = '') content_for?(section) ? conten...
github
diowa/ruby2-rails5-bootstrap-heroku
https://github.com/diowa/ruby2-rails5-bootstrap-heroku
spec/rails_helper.rb
Ruby
bsd-2-clause
45
main
3,797
# frozen_string_literal: true require 'simplecov' SimpleCov.start 'rails' do if ENV['CI'] require 'simplecov-lcov' SimpleCov::Formatter::LcovFormatter.config do |c| c.report_with_single_file = true c.single_report_path = 'coverage/lcov.info' end formatter SimpleCov::Formatter::LcovForm...
github
diowa/ruby2-rails5-bootstrap-heroku
https://github.com/diowa/ruby2-rails5-bootstrap-heroku
spec/spec_helper.rb
Ruby
bsd-2-clause
45
main
4,622
# frozen_string_literal: true # This file was generated by the `rails generate rspec:install` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. # The generated `.rspec` file contains `--require spec_helper` which will cause # this file to always be loaded, withou...
github
diowa/ruby2-rails5-bootstrap-heroku
https://github.com/diowa/ruby2-rails5-bootstrap-heroku
spec/system/pages_spec.rb
Ruby
bsd-2-clause
45
main
232
# frozen_string_literal: true require 'rails_helper' RSpec.describe 'Pages' do describe 'Home' do it 'has application name in title' do visit root_path expect(page).to have_title t('app_name') end end end
github
diowa/ruby2-rails5-bootstrap-heroku
https://github.com/diowa/ruby2-rails5-bootstrap-heroku
spec/support/selenium_browser_error_reporter.rb
Ruby
bsd-2-clause
45
main
1,017
# frozen_string_literal: true class SeleniumBrowserErrorReporter SEVERE_LOG_LEVEL = 'SEVERE' def self.call(page) new(page).report! end def self.clear_error_logs!(page) new(page).clear_error_logs! end def initialize(page) self.page = page end def report! raise error_messages if sever...
github
diowa/ruby2-rails5-bootstrap-heroku
https://github.com/diowa/ruby2-rails5-bootstrap-heroku
config/routes.rb
Ruby
bsd-2-clause
45
main
235
# frozen_string_literal: true Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html root 'pages#home' get :hello_world, to: 'pages#hello_world' end
github
diowa/ruby2-rails5-bootstrap-heroku
https://github.com/diowa/ruby2-rails5-bootstrap-heroku
config/application.rb
Ruby
bsd-2-clause
45
main
1,264
# frozen_string_literal: true require_relative 'boot' require 'rails' # Pick the frameworks you want: require 'active_model/railtie' require 'active_job/railtie' require 'active_record/railtie' require 'active_storage/engine' require 'action_controller/railtie' require 'action_mailer/railtie' require 'action_view/rai...
github
diowa/ruby2-rails5-bootstrap-heroku
https://github.com/diowa/ruby2-rails5-bootstrap-heroku
config/initializers/content_security_policy.rb
Ruby
bsd-2-clause
45
main
1,122
# frozen_string_literal: true # Be sure to restart your server when you modify this file. # Define an application-wide content security policy # For further information see the following documentation # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy # Rails.application.config.conten...
github
diowa/ruby2-rails5-bootstrap-heroku
https://github.com/diowa/ruby2-rails5-bootstrap-heroku
config/environments/test.rb
Ruby
bsd-2-clause
45
main
1,904
# frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # The test environment is used exclusively to run your application's # test suite. You never need to work with it otherwise. Remember that # your test database is "s...
github
diowa/ruby2-rails5-bootstrap-heroku
https://github.com/diowa/ruby2-rails5-bootstrap-heroku
config/environments/production.rb
Ruby
bsd-2-clause
45
main
3,804
# frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Verifies that versions and hashed value of the package contents in the project's package.json config.webpacker.check_yarn_integrity = false # Code is not reloaded...
github
diowa/ruby2-rails5-bootstrap-heroku
https://github.com/diowa/ruby2-rails5-bootstrap-heroku
config/environments/development.rb
Ruby
bsd-2-clause
45
main
2,067
# frozen_string_literal: true Rails.application.configure do # Settings specified here will take precedence over those in config/application.rb. # Verifies that versions and hashed value of the package contents in the project's package.json config.webpacker.check_yarn_integrity = true # In the development en...
github
logstash-plugins/logstash-input-journald
https://github.com/logstash-plugins/logstash-input-journald
logstash-input-journald.gemspec
Ruby
apache-2.0
45
main
1,504
Gem::Specification.new do |s| s.name = 'logstash-input-journald' s.version = '2.0.2' s.licenses = ['Apache License (2.0)'] s.summary = "Read events from local systemd journal" s.description = "This gem is a Logstash plugin required to be installed on top of the Logstash ...
github
logstash-plugins/logstash-input-journald
https://github.com/logstash-plugins/logstash-input-journald
spec/inputs/journald_spec.rb
Ruby
apache-2.0
45
main
233
# encoding: utf-8 require "logstash/devutils/rspec/spec_helper" require "socket" require "logstash/inputs/journald" describe LogStash::Inputs::Journald do context "Ummm" do it "no tests here" do end end end
github
logstash-plugins/logstash-input-journald
https://github.com/logstash-plugins/logstash-input-journald
lib/logstash/inputs/journald.rb
Ruby
apache-2.0
45
main
6,557
# encoding: utf-8 require "logstash/inputs/threadable" require "logstash/namespace" require "socket" require "systemd/journal" require "fileutils" # For touch require "base64" # Pull events from a local systemd journal. # # See requirements https://github.com/ledbettj/systemd-journal class LogStash::Inputs::Journald <...
github
rubys/wave-robot-ruby-client
https://github.com/rubys/wave-robot-ruby-client
Rakefile
Ruby
apache-2.0
45
master
213
require 'rubygems' require 'rake' require 'rake/testtask' Rake::TestTask.new(:test) do |test| test.libs << 'lib' << 'test' test.pattern = 'test/**/*_test.rb' test.verbose = true end task :default => :test
github
rubys/wave-robot-ruby-client
https://github.com/rubys/wave-robot-ruby-client
test/document_test.rb
Ruby
apache-2.0
45
master
2,975
#!/usr/bin/ruby # # Copyright 2009 Google Inc. All Rights Reserved. """Unit tests for the document module.""" __author__ = 'davidbyttow@google.com (David Byttow)' require 'test/unit' require 'document' require 'util' # class TestRange < Test::Unit::TestCase # """Tests for the Range class.""" # # def testDefau...
github
rubys/wave-robot-ruby-client
https://github.com/rubys/wave-robot-ruby-client
test/abstract_robot_test.rb
Ruby
apache-2.0
45
master
5,981
#! ruby # # Copyright 2009 Google Inc. All Rights Reserved. """Unit tests for the robot_abstract module.""" __author__ = 'jacobly@google.com (Jacob Lee)' require 'test/unit' require 'abstract_robot' DEBUG_DATA = '{"blips":{"map":{"wdykLROk*13":{"lastModifiedTime":1242079608457,"contributors":{"javaClass":"java.uti...
github
rubys/wave-robot-ruby-client
https://github.com/rubys/wave-robot-ruby-client
test/robot_test.rb
Ruby
apache-2.0
45
master
3,322
require 'test/unit' require 'abstract_robot' class Robot < AbstractRobot set_name "Testy" set_profile_url 'http://example.com/profile.xml' set_image_url 'http://example.com/image.png' add_cron :clock, 20 def DOCUMENT_CHANGED(properties, context) wavelet = context.GetWavelets()[0] blip = context...
github
rubys/wave-robot-ruby-client
https://github.com/rubys/wave-robot-ruby-client
test/ops_test.rb
Ruby
apache-2.0
45
master
7,537
#!/usr/bin/python2.4 # # Copyright 2009 Google Inc. All Rights Reserved. """Unit tests for the ops module.""" __author__ = 'davidbyttow@google.com (David Byttow)' require 'test/unit' require 'document' require 'model' require 'ops' class TestOperation < Test::Unit::TestCase """Test case for Operation class.""...
github
rubys/wave-robot-ruby-client
https://github.com/rubys/wave-robot-ruby-client
test/model_test.rb
Ruby
apache-2.0
45
master
3,206
#!/usr/bin/python2.4 # # Copyright 2009 Google Inc. All Rights Reserved. """Unit tests for the model module.""" __author__ = 'davidbyttow@google.com (David Byttow)' require 'test/unit' require 'model' class TestWaveModel < Test::Unit::TestCase """Tests the primary data structures for the wave model.""" def...
github
rubys/wave-robot-ruby-client
https://github.com/rubys/wave-robot-ruby-client
test/util_test.rb
Ruby
apache-2.0
45
master
4,306
#!/usr/bin/python2.4 # # Copyright 2009 Google Inc. All Rights Reserved. """Unit tests for the util module.""" __author__ = 'davidbyttow@google.com (David Byttow)' require 'test/unit' require 'document' require 'util' class TestUtils < Test::Unit::TestCase """Tests utility functions.""" def testIsListOrDi...
github
rubys/wave-robot-ruby-client
https://github.com/rubys/wave-robot-ruby-client
lib/ops.rb
Ruby
apache-2.0
45
master
34,513
#!/usr/bin/python2.4 # # Copyright 2009 Google Inc. All Rights Reserved. """Support for operations that can be applied to the server. Contains classes and utilities for creating operations that are to be applied on the server. """ __author__ = 'davidbyttow@google.com (David Byttow)' require 'document' require 'mod...
github
rubys/wave-robot-ruby-client
https://github.com/rubys/wave-robot-ruby-client
lib/util.rb
Ruby
apache-2.0
45
master
8,076
#!/usr/bin/python2.4 # # Copyright 2009 Google Inc. All Rights Reserved. """Utility library containing various helpers used by the API. Contains miscellaneous functions used internally by the API. """ __author__ = 'davidbyttow@google.com (David Byttow)' require 'document' module Util CUSTOM_SERIALIZE_METHOD_NAM...
github
rubys/wave-robot-ruby-client
https://github.com/rubys/wave-robot-ruby-client
lib/document.rb
Ruby
apache-2.0
45
master
3,694
#!/usr/bin/ruby # # Copyright 2009 Google Inc. All Rights Reserved. """Defines document-based classes. This module defines classes that are used to modify and describe documents and their operations. """ __author__ = 'davidbyttow@google.com (David Byttow)' require 'util' # class Range(object) # JAVA_CLASS = 'com....
github
rubys/wave-robot-ruby-client
https://github.com/rubys/wave-robot-ruby-client
lib/model.rb
Ruby
apache-2.0
45
master
10,478
#!/usr/bin/python2.4 # # Copyright 2009 Google Inc. All Rights Reserved. """Defines classes that represent parts of the common wave model. Defines the core data structures for the common wave model. At this level, models are read-only but can be modified through operations. """ __author__ = 'davidbyttow@google.com (...
github
rubys/wave-robot-ruby-client
https://github.com/rubys/wave-robot-ruby-client
lib/abstract_robot.rb
Ruby
apache-2.0
45
master
3,280
#!/usr/bin/python2.4 # # Copyright 2009 Google Inc. All Rights Reserved. """Defines the generic robot classes. This module provides the Robot class and RobotListener interface, as well as some helper functions for web requests and responses. """ __author__ = 'davidbyttow@google.com (David Byttow)' require 'model' r...
github
rubys/wave-robot-ruby-client
https://github.com/rubys/wave-robot-ruby-client
lib/events.rb
Ruby
apache-2.0
45
master
1,223
#!/usr/bin/python2.4 # # Copyright 2009 Google Inc. All Rights Reserved. """Defines event types that are sent from the wave server. This module defines all of the event types currently supported by the wave server. """ __author__ = 'davidbyttow@google.com (David Byttow)' # Event Types WAVELET_BLIP_CREATED = 'WAVEL...
github
rubys/wave-robot-ruby-client
https://github.com/rubys/wave-robot-ruby-client
lib/errors.rb
Ruby
apache-2.0
45
master
351
#!/usr/bin/python2.4 # # Copyright 2009 Google Inc. All Rights Reserved. """Contains various API-specific exception classes. This module contains various specific exception classes that are raised by the library back to the client. """ __author__ = 'davidbyttow@google.com (David Byttow)' class Error(Exception): ...
github
gosu/fidgit
https://github.com/gosu/fidgit
fidgit.gemspec
Ruby
mit
45
master
1,118
$LOAD_PATH.unshift File.expand_path('../lib', __FILE__) require 'fidgit/version' Gem::Specification.new do |s| s.name = 'fidgit' s.version = Fidgit::VERSION s.platform = Gem::Platform::RUBY s.authors = ['Bil Bas (Spooner)'] s.email = ['bil.bagpuss@gmail.com'] s.homepage = 'https:...
github
gosu/fidgit
https://github.com/gosu/fidgit
examples/slider_example.rb
Ruby
mit
45
master
992
require_relative 'helpers/example_window' class ExampleState < Fidgit::GuiState def initialize super vertical do horizontal do # Discrete values (0..100) slider = slider(width: 100, range: 0..5, value: 3, tip: "Discrete value is") do |sender, value| @discrete_label.text = "Di...
github
gosu/fidgit
https://github.com/gosu/fidgit
examples/readme_example.rb
Ruby
mit
45
master
830
require_relative "../lib/fidgit" # Normally, you'd load this from the gem using: # require 'fidgit' class MyGame < Chingu::Window def initialize super(640, 480, false) # To use the Fidgit features, a Fidgit::GuiState must be active. push_game_state MyGuiState end end class MyGuiState < Fidgit::Gui...
github
gosu/fidgit
https://github.com/gosu/fidgit
examples/label_example.rb
Ruby
mit
45
master
985
require_relative 'helpers/example_window' # Labels can have text and/or icons. class ExampleState < Fidgit::GuiState def initialize super vertical background_color: Gosu::Color.rgb(255, 0, 0) do label "Hello!", tip: 'A label with text' label "Hello!", icon: Gosu::Image["head_icon.png"], tip: 'A ...
github
gosu/fidgit
https://github.com/gosu/fidgit
examples/_all_examples.rb
Ruby
mit
45
master
306
# Run all examples, one after the other require_relative 'helpers/example_window' examples = Dir.glob(File.join(File.dirname(__FILE__), "*.rb")) - [__FILE__] examples.each_with_index do |file_name, index| ENV['FIDGIT_EXAMPLES_TEXT'] = "[#{index + 1} of #{examples.size + 1}]" `ruby #{file_name}` end
github
gosu/fidgit
https://github.com/gosu/fidgit
examples/combo_box_example.rb
Ruby
mit
45
master
522
require_relative 'helpers/example_window' # Example for Button and ToggleButton class ExampleState < Fidgit::GuiState def initialize super vertical do my_label = label "Label", tip: "I'm a label" combo_box(value: 1, tip: "I'm a combo box; press me and make a selection!") do subscribe :c...
github
gosu/fidgit
https://github.com/gosu/fidgit
examples/button_and_toggle_button_example.rb
Ruby
mit
45
master
1,315
require_relative 'helpers/example_window' # Example for Button and ToggleButton class ExampleState < Fidgit::GuiState def initialize super vertical do my_label = label "Label", tip: "I'm a label" buttons = [] # A plain button, with some text on it. buttons << button("Button", tip: ...
github
gosu/fidgit
https://github.com/gosu/fidgit
examples/file_dialog_example.rb
Ruby
mit
45
master
1,336
require_relative 'helpers/example_window' Fidgit::Element.schema.merge_elements!(Element: { font_height: 15 }) class ExampleState < Fidgit::GuiState def initialize super container.background_color = Gosu::Color.rgb(50, 50, 50) vertical align: :center do full_base_directory = '' restricted_...
github
gosu/fidgit
https://github.com/gosu/fidgit
examples/grid_packer_example.rb
Ruby
mit
45
master
913
require_relative 'helpers/example_window' class ExampleState < Fidgit::GuiState BORDER_COLOR = Gosu::Color.rgb(255, 0, 0) FIXED_NUM = 5 NUM_CELLS = 17 def initialize super vertical do label "Grid with #{FIXED_NUM} columns" grid num_columns: FIXED_NUM, border_color: BORDER_COLOR, cell_bord...
github
gosu/fidgit
https://github.com/gosu/fidgit
examples/list_example.rb
Ruby
mit
45
master
576
require_relative 'helpers/example_window' # Labels can have text and/or icons. class ExampleState < Fidgit::GuiState def initialize super vertical do my_label = label "No clicky" list do item "chunky bacon", :CHUNKYBACON, tip: "You prefer Chunky Bacon, don't you?" item "lentils"...
github
gosu/fidgit
https://github.com/gosu/fidgit
examples/menu_pane_example.rb
Ruby
mit
45
master
712
require_relative 'helpers/example_window' # Labels can have text and/or icons. class ExampleState < Fidgit::GuiState def initialize super vertical do my_label = label "Right click to open context menu" my_label.subscribe :released_right_mouse_button do menu do item "Chunky bac...