Closed Hedrauta closed 3 years ago
This will be caused by the 1000 buy limit on the API. I'll get a fix in to clamp the max quantity soon.
PS C:\Users\h3dra>
$token = '********************************'
$username = 'H3draut3r'
$params = @{
Uri = "https://api.spacetraders.io/users/$username/sell-orders"
Headers = @{ 'Authorization' = "Bearer $token" }
Method = 'POST'
Body = @{ 'ShipId' = "**********************"; 'good' = "RESEARCH" ; 'quantity' = "5725" }
}
$info = Invoke-WebRequest -UseBasicParsing @params
$info
Invoke-WebRequest : {"error":{"message":"The payload was invalid. Please check the error details to correct your payload and try again.","code":42201,"data":{"shipId":["The shipId field is
required."],"quantity":["The quantity may not be greater than 1000."]}}}
Ye... I found that one too... after testing it on a Powershell-script 😄
Repeating requests when over the buy limit has been added in 0dd17f3.
Failed to load resource: the server responded with a status of 422 ()
Tried buying the max of 4834 research at XV-TLF .... got an error.... what does 422 mean? Had about 17million on bank... buying a smaller package ( 4x1k + 1x834) worked fine <.<