Module: Binance::Spot::Convert
- Included in:
- Binance::Spot
- Defined in:
- lib/binance/spot/convert.rb
Overview
Convert endpoints
Instance Method Summary collapse
-
#convert_accept_quote(quoteId:, **kwargs) ⇒ Object
Accept Quote (TRADE).
-
#convert_asset_info(**kwargs) ⇒ Object
Query order quantity precision per asset (USER_DATA).
-
#convert_exchange_info(**kwargs) ⇒ Object
List All Convert Pairs.
-
#convert_get_quote(fromAsset:, toAsset:, **kwargs) ⇒ Object
Send Quote Request (USER_DATA).
-
#convert_limit_cancel_order(orderId:, **kwargs) ⇒ Object
Cancel limit order (USER_DATA).
-
#convert_limit_place_order(baseAsset:, quoteAsset:, limitPrice:, side:, expiredType:, **kwargs) ⇒ Object
Place limit order (USER_DATA).
-
#convert_limit_query_open_orders(**kwargs) ⇒ Object
Query limit open orders (USER_DATA).
-
#convert_order_status(**kwargs) ⇒ Object
Order status (USER_DATA).
-
#convert_trade_flow(startTime:, endTime:, **kwargs) ⇒ Object
Get Convert Trade History (USER_DATA).
Instance Method Details
#convert_accept_quote(quoteId:, **kwargs) ⇒ Object
Accept Quote (TRADE)
POST /sapi/v1/convert/acceptQuote
62 63 64 65 66 67 68 |
# File 'lib/binance/spot/convert.rb', line 62 def convert_accept_quote(quoteId:, **kwargs) Binance::Utils::Validation.require_param('quoteId', quoteId) @session.sign_request(:post, '/sapi/v1/convert/acceptQuote', params: kwargs.merge( quoteId: quoteId )) end |
#convert_asset_info(**kwargs) ⇒ Object
Query order quantity precision per asset (USER_DATA)
GET /sapi/v1/convert/assetInfo
27 28 29 |
# File 'lib/binance/spot/convert.rb', line 27 def convert_asset_info(**kwargs) @session.sign_request(:get, '/sapi/v1/convert/assetInfo', params: kwargs) end |
#convert_exchange_info(**kwargs) ⇒ Object
List All Convert Pairs
GET /sapi/v1/convert/exchangeInfo
16 17 18 |
# File 'lib/binance/spot/convert.rb', line 16 def convert_exchange_info(**kwargs) @session.sign_request(:get, '/sapi/v1/convert/exchangeInfo', params: kwargs) end |
#convert_get_quote(fromAsset:, toAsset:, **kwargs) ⇒ Object
Send Quote Request (USER_DATA)
POST /sapi/v1/convert/getQuote
44 45 46 47 48 49 50 51 52 |
# File 'lib/binance/spot/convert.rb', line 44 def convert_get_quote(fromAsset:, toAsset:, **kwargs) Binance::Utils::Validation.require_param('fromAsset', fromAsset) Binance::Utils::Validation.require_param('toAsset', toAsset) @session.sign_request(:post, '/sapi/v1/convert/getQuote', params: kwargs.merge( fromAsset: fromAsset, toAsset: toAsset )) end |
#convert_limit_cancel_order(orderId:, **kwargs) ⇒ Object
Cancel limit order (USER_DATA)
POST /sapi/v1/convert/limit/cancelOrder
141 142 143 144 145 146 147 |
# File 'lib/binance/spot/convert.rb', line 141 def convert_limit_cancel_order(orderId:, **kwargs) Binance::Utils::Validation.require_param('orderId', orderId) @session.sign_request(:post, '/sapi/v1/convert/limit/cancelOrder', params: kwargs.merge( orderId: orderId )) end |
#convert_limit_place_order(baseAsset:, quoteAsset:, limitPrice:, side:, expiredType:, **kwargs) ⇒ Object
Place limit order (USER_DATA)
POST /sapi/v1/convert/limit/placeOrder
117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 |
# File 'lib/binance/spot/convert.rb', line 117 def convert_limit_place_order(baseAsset:, quoteAsset:, limitPrice:, side:, expiredType:, **kwargs) Binance::Utils::Validation.require_param('baseAsset', baseAsset) Binance::Utils::Validation.require_param('quoteAsset', quoteAsset) Binance::Utils::Validation.require_param('limitPrice', limitPrice) Binance::Utils::Validation.require_param('side', side) Binance::Utils::Validation.require_param('expiredType', expiredType) @session.sign_request(:post, '/sapi/v1/convert/limit/placeOrder', params: kwargs.merge( baseAsset: baseAsset, quoteAsset: quoteAsset, limitPrice: limitPrice, side: side, expiredType: expiredType )) end |
#convert_limit_query_open_orders(**kwargs) ⇒ Object
Query limit open orders (USER_DATA)
POST /sapi/v1/convert/limit/queryOpenOrders
156 157 158 |
# File 'lib/binance/spot/convert.rb', line 156 def convert_limit_query_open_orders(**kwargs) @session.sign_request(:post, '/sapi/v1/convert/limit/queryOpenOrders', params: kwargs) end |
#convert_order_status(**kwargs) ⇒ Object
Order status (USER_DATA)
GET /sapi/v1/convert/orderStatus
98 99 100 |
# File 'lib/binance/spot/convert.rb', line 98 def convert_order_status(**kwargs) @session.sign_request(:get, '/sapi/v1/convert/orderStatus', params: kwargs) end |
#convert_trade_flow(startTime:, endTime:, **kwargs) ⇒ Object
Get Convert Trade History (USER_DATA)
GET /sapi/v1/convert/tradeFlow
80 81 82 83 84 85 86 87 88 |
# File 'lib/binance/spot/convert.rb', line 80 def convert_trade_flow(startTime:, endTime:, **kwargs) Binance::Utils::Validation.require_param('startTime', startTime) Binance::Utils::Validation.require_param('endTime', endTime) @session.sign_request(:get, '/sapi/v1/convert/tradeFlow', params: kwargs.merge( startTime: startTime, endTime: endTime )) end |