Class: DhanHQ::Resources::Trades
- Defined in:
- lib/DhanHQ/resources/trades.rb
Overview
Provides access to current day trades endpoints
Constant Summary collapse
- API_TYPE =
Trade history is fetched from the trading API tier.
:order_api- HTTP_PATH =
Base path for trade retrieval.
"/v2/trades"
Instance Attribute Summary
Attributes inherited from BaseAPI
Instance Method Summary collapse
-
#all ⇒ Object
GET /v2/trades.
-
#find(order_id) ⇒ Object
GET /v2/trades/order-id.
Methods inherited from BaseAPI
#delete, #get, #initialize, #post, #put
Methods included from AttributeHelper
#camelize_keys, #deep_camelize_keys, #inspect, #normalize_keys, #snake_case, #titleize_keys
Methods included from APIHelper
Constructor Details
This class inherits a constructor from DhanHQ::BaseAPI
Instance Method Details
#all ⇒ Object
GET /v2/trades
13 14 15 |
# File 'lib/DhanHQ/resources/trades.rb', line 13 def all get("") end |
#find(order_id) ⇒ Object
GET /v2/trades/order-id
18 19 20 |
# File 'lib/DhanHQ/resources/trades.rb', line 18 def find(order_id) get("/#{order_id}") end |