JKorf / Binance.Net

A C# .netstandard client library for the Binance REST and Websocket Spot and Futures API focusing on clear usage and models
https://jkorf.github.io/Binance.Net/
MIT License
1.02k stars 420 forks source link

Need add 'orderId' to BinancePayTrade #1375

Closed laomms closed 2 months ago

laomms commented 2 months ago

when I use GetPayTradeHistoryAsync (), the return value: IEnumerable<BinancePayTrade> are not contain orderId item:

1

but I try get from postman, it contained:

2

It is very necessary to add this item, especially when the customer makes multiple payments, and orderId is the main basis.

3

JKorf commented 2 months ago

Hi, I don't have any test data so the current implementation is based on the API documentation. That's probably incomplete though, so could you maybe share some of the data you receive from the endpoint so I can match the response model? Obviously blur out anything sensitive

laomms commented 2 months ago

sure!

{
    "code": "000000",
    "message": "success",
    "data": [
        {
            "uid": 7******2,
            "counterpartyId": 579313011,
            "orderId": "294163557804187651",
            "note": "",
            "orderType": "C2C",
            "transactionId": "P_A1JM7ZT9MM571112",
            "transactionTime": 1714817381912,
            "amount": "5",
            "currency": "USDT",
            "walletType": 1,
            "walletTypes": [
                "1"
            ],
            "fundsDetail": [
                {
                    "currency": "USDT",
                    "amount": "5",
                    "walletAssetCost": {
                        "1": "5"
                    }
                }
            ],
            "payerInfo": {
                "name": "F******S",
                "type": "USER",
                "email": "md.***@gmail.com",
                "binanceId": 5*******6,
                "accountId": 5*******1,
                "countryCode": 880,
                "phoneNumber": "018******41",
                "mobileCode": "BD",
                "unmaskData": false
            },
            "receiverInfo": {
                "name": "b****s",
                "type": "USER",
                "email": "lao***@gmail.com",
                "binanceId": 7*******2,
                "accountId": 7*******3,
                "countryCode": 88,
                "phoneNumber": "1********90",
                "mobileCode": "EN",
                "unmaskData": false
            },
            "totalPaymentFee": "0"
        },
        {
            "uid": 7******2,
            "counterpartyId": 406201343,
            "orderId": "294052657623097345",
            "note": "ABC",
            "orderType": "C2C",
            "transactionId": "P_A1JKUDBWMBW71115",
            "transactionTime": 1714765739266,
            "amount": "1",
            "currency": "USDT",
            "walletType": 1,
            "walletTypes": [
                "1"
            ],
            "fundsDetail": [
                {
                    "currency": "USDT",
                    "amount": "1",
                    "walletAssetCost": {
                        "1": "1"
                    }
                }
            ],
            "payerInfo": {
                "name": "A******z",
                "type": "USER",
                "email": "akr***@gmail.com",
                "binanceId": 4*******3,
                "accountId": 4*******3,
                "countryCode": 213,
                "phoneNumber": "79*****64",
                "mobileCode": "DZ",
                "unmaskData": false
            },
            "receiverInfo": {
                "name": "b****s",
                "type": "USER",
                "email": "lao***@gmail.com",
                "binanceId": 7*******2,
                "accountId": 7*******3,
                "countryCode": 88,
                "phoneNumber": "1********90",
                "mobileCode": "EN",
                "unmaskData": false
            },
            "totalPaymentFee": "0"
        }
    "success": true
}

IIt looks the original BinancePayTrade definition only omitted these items: "uid" "counterpartyId" "orderId" "note" "totalPaymentFee" "success"

JKorf commented 2 months ago

It's been updated in version 9.9.6