Skip to content

Commit

Permalink
Merge pull request #140 from Polymarket/feat/rewards-market-competiti…
Browse files Browse the repository at this point in the history
…veness

Feat/rewards market competitiveness
  • Loading branch information
poly-rodr authored Feb 1, 2025
2 parents 0ea25e1 + 51571b1 commit 28968b8
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 2 deletions.
3 changes: 2 additions & 1 deletion examples/rewards.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,10 @@ async function main() {
console.log(
"rewards",
await clobClient.getUserEarningsAndMarketsConfig(
"2024-04-09" /* UTC TIME */,
"2025-01-31" /* UTC TIME */,
"earnings",
"DESC",
true,
),
);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@polymarket/clob-client",
"description": "Typescript client for Polymarket's CLOB",
"version": "4.14.0",
"version": "4.15.0",
"contributors": [
{
"name": "Jonathan Amenechi",
Expand Down
2 changes: 2 additions & 0 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,7 @@ export class ClobClient {
date: string,
order_by = "",
position = "",
no_competition = false,
): Promise<UserRewardsEarning[]> {
this.canL2Auth();

Expand All @@ -939,6 +940,7 @@ export class ClobClient {
next_cursor,
order_by,
position,
no_competition,
};

const response = await this.get(`${this.host}${endpoint}`, {
Expand Down
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -446,6 +446,7 @@ export interface UserRewardsEarning {
image: string;
rewards_max_spread: number;
rewards_min_size: number;
market_competitiveness: number;
tokens: Token[];
rewards_config: RewardsConfig[];
maker_address: string;
Expand Down

0 comments on commit 28968b8

Please sign in to comment.