Skip to content

Commit db8d569

Browse files
authored
Pagination was added to the searchMarketV3 (#305)
2 parents 8d2d09f + 633ad6b commit db8d569

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/miscRequests.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,10 @@ module.exports = {
133133
* | 'futures' | 'forex' | 'cfd'
134134
* | 'crypto' | 'index' | 'economic'
135135
* } [filter] Caterogy filter
136+
* @param {number} offset Pagination offset
136137
* @returns {Promise<SearchMarketResult[]>} Search results
137138
*/
138-
async searchMarketV3(search, filter = '') {
139+
async searchMarketV3(search, filter = '', offset = 0) {
139140
const splittedSearch = search.toUpperCase().replace(/ /g, '+').split(':');
140141

141142
const request = await axios.get(
@@ -148,6 +149,7 @@ module.exports = {
148149
),
149150
text: splittedSearch.pop(),
150151
search_type: filter,
152+
start: offset,
151153
},
152154
headers: {
153155
origin: 'https://www.tradingview.com',

0 commit comments

Comments
 (0)