Skip to content

Commit 23f8949

Browse files
committed
add docs
1 parent da5c38b commit 23f8949

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

gdax/public_client.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,30 @@ def get_product_ticker(self, product_id):
120120
return self._get('/products/{}/ticker'.format(str(product_id)))
121121

122122
def get_product_trades(self, product_id, before='', after='', limit='', result=[]):
123+
"""List the latest trades for a product.
124+
Args:
125+
product_id (str): Product
126+
before (Optional[str]): start time in ISO 8601
127+
after (Optional[str]): end time in ISO 8601
128+
limit (Optional[int]): the desired number of trades (can be more than 100,
129+
automatically paginated)
130+
results (Optional[list]): list of results that is used for the pagination
131+
Returns:
132+
list: Latest trades. Example::
133+
[{
134+
"time": "2014-11-07T22:19:28.578544Z",
135+
"trade_id": 74,
136+
"price": "10.00000000",
137+
"size": "0.01000000",
138+
"side": "buy"
139+
}, {
140+
"time": "2014-11-07T01:08:43.642366Z",
141+
"trade_id": 73,
142+
"price": "100.00000000",
143+
"size": "0.01000000",
144+
"side": "sell"
145+
}]
146+
""""
123147
url = self.url + '/products/{}/trades'.format(str(product_id))
124148
params = {}
125149

0 commit comments

Comments
 (0)