Simple Earning API: Assign flexible rewards to products not possible?

Is there any way to assign rewards to the associated flexible product? Since there is no ID in the payload like in this example:

{
  "rows": [
    {
      "asset": "BUSD",
      "rewards": "0.00006408",
      "projectId": "USDT001",
      "type": "BONUS",
      "time": 1577233578000
    },
    {
      "asset": "USDT",
      "rewards": "0.00687654",
      "projectId": "USDT001",
      "type": "REALTIME",
      "time": 1577233562000
    }
  ],
  "total": 2
}

there is no way to do it or am I missing something?

Hello, there’s the projectId field in the example you’ve provided, which identifies the product for which you’re receiving rewards.

1 Like

Well my bad, these are the data from the official binance API and weren’t fit to my data. Here are real data ragarding to rewards of flexible products:
GET /sapi/v1/simple-earn/flexible/history/rewardsRecord

  rows: [
    {
      asset: 'BAL',
      rewards: '0.01301393',
      productId: 'BAL',
      type: 'REWARDS',
      time: '1677028481000'
    },
]

And here is a payload for getting the positions
GET /sapi/v1/simple-earn/flexible/history/subscriptionRecord

  rows: [
    {
      amount: '5596.23059332',
      asset: 'BAL',
      time: '1691723782100',
      status: 'SUCCESS',
      purchaseId: '516023501',
      type: 'CONVERT',
      sourceAccount: 'SPOT'
    },
]

As you can see the productId doesn’t match. In the second payload we have a purchaseId, which isn’t within the first payload…

1 Like

GET /sapi/v1/simple-earn/flexible/history/subscriptionRecord accepts a parameter named productId, which is used to filter the search based on the product Id that you want to retrieve the records.
Source: Binance API Documentation

In simple workflow, every time you subscribe to a product ID, it’ll generates a purchase ID, and one subscription can receive many rewards.

1 Like