This sub-resource allows the user to place a Scale Auction order.
Operation: POST
URL: https://api.lendingclub.com/api/lcx/v1/primary/investors/{investor-id}/passive/orders/buy-order
Path Parameters:
Name | Type | Required | Description |
---|---|---|---|
Investor-id | Integer | Yes | Investor’s Actor ID |
Query Parameters: None
Supported formats: JSON
Request Payload: JSON request for submit order
Body Parameters:
Name | Type | Required | Description |
---|---|---|---|
orderType | String | Yes | LIMIT |
passiveItems | An array of passive items (details below) | ||
buyerAid | Long | No | AID of the buyer |
passiveItems:
Name | Type | Required | Description |
---|---|---|---|
loanGrade | String | Yes | Grade for loans |
orderAmount | BigDecimal | Yes | Requested order volume in dollars, value must be positive, each bid should be above minimum of 40,000 |
bidPricePercent | BigDecimal | Yes | Bid price percentage vs par 1.0 is 100% or par, bid price must be positive and between 1(100%) to 1.05 (105%) |
roomName | String | Yes | Passive auction room |
Payload Schema:
{
"buyerAid": 12345,
"orderType": "LIMIT",
"passiveItems": [
{
"loanGrade": “P1”,
"bidPricePercent": 1,
“orderAmount”: 100000,
“roomName”: “PASSIVE_ROOM”
}
]
}
Response Parameters:
Name | Type | Description |
---|---|---|
buyerAid | Long | AID of buyer |
orderId | Long | Unique Id of the order |
passiveItems | Array of passive item for the order – see details below |
passiveItems:
Name | Type | Description |
---|---|---|
id | Long | Unique id for the passive item |
loanGrade | String | Grade for the loan |
bidPricePercent | BigDecimal | Bid price percentage vs par1.0 is 100% or par |
orderAmount | BigDecimal | Order volume in dollars |
roomName | String | Name of the room where order was placed |
status | String | Status of the passive order item. Possible statuses RECEIVED REJECTED FILLED (Not a possible status at time of buy order submission. Only available after fulfillment) NOT_FILLED (Not a possible status at time of buy order submission. Only available after fulfillment) |
statusDate | Timestamp | Timestamp when the status was set, in UTC |
failReason | String | Reason for rejection of a passive order item. Possible reasons: ACTIVE_BID_EXISTS BID_PRICE_TOO_HIGH BID_PRICE_TOO_LOW BUYER_NOT_ACTIVE_IN_ROOM |
Sample Request:
https://api.lendingclub.com/api/lcx/v1/primary/investors/123123123/passive/orders/buy-order
Sample Body:
{
"orderType": "LIMIT",
"passiveItems": [
{
"bidPricePercent": 1.03,
"loanGrade": "P1",
"roomName": "PASSIVE-ROOM-1",
"orderAmount": 50000
},
{
"bidPricePercent": 2.0,
"loanGrade": "P2",
"roomName": "PASSIVE-ROOM-1",
"orderAmount": 60000
},
{
"bidPricePercent": 1,
"loanGrade": "P1",
"roomName": "PASSIVE-ROOM-2",
"orderAmount": 40000
}
]
}
Sample Response:
{
"orderId": 101,
"passiveItems": [
{
"id": 10001,
"loanGrade": "P1",
"bidPricePercentage": 1.03,
"orderAmount": 50000,
"roomName": "PASSIVE-ROOM-1",
"status": "RECEIVED",
"statusDate": "2022-04-04T01:12:20.788Z"
},
{
"id": 10002,
"loanGrade": "P2",
"bidPricePercentage": 2.0,
"orderAmount": 60000,
"roomName": "PASSIVE-ROOM-1",
"status": "REJECTED",
"statusDate": "2022-04-04T01:12:20.788Z",
"failReason": "BID_PRICE_TOO_HIGH"
},
{
"id": 10003,
"loanGrade": "P1",
"bidPricePercentage": 1,
"orderAmount": 40000,
"roomName": "PASSIVE-ROOM-2",
"status": "REJECTED",
"statusDate": "2022-04-04T01:12:20.788Z",
"failReason": "BUYER_NOT_ACTIVE_IN_ROOM"
}
]
}
Passive Buy API Validation
There are two types of validation errors:
Error #1: When the request itself is invalid, the request will receive 400 response and no bids will be accepted into the system.
API level validation error happens when:
1. Bids are submitted outside of open bidding window
2. Not all the rooms in request are open passive auction rooms
3. Buyer has insufficient fund to cover combined amount from bids
4. Any bids in request is below minimum amount of $40,000.00
5. Request contains multiple bids of same room/grade
Error #2: When the request itself is valid but one or more of the bids are invalid, the invalid bids will be saved in system with REJECTED status while the valid bids are accepted.
API level validation error happens when:
1. Buyer already has another RECEIVED bid in the same room
2. Bid price is too high
3. Bid price is too low
4. Buyer is not an active buyer in room
5. Bid amount is missing or non positive
HTTP Status Summary:
Code Description
200 Success
400 Validation or business error
401 Unauthorized
403 Forbidden
404 Not Found
452 Market closed
500 Unexpected failure