Amend a bid
curl --request PATCH \
--url https://ge-exchange-staging-1.herokuapp.com/v1/api/commitment/{commitmentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 123,
"bid_price": 123,
"bid_rate": 123,
"is_strike_bid": true
}
'import requests
url = "https://ge-exchange-staging-1.herokuapp.com/v1/api/commitment/{commitmentId}"
payload = {
"amount": 123,
"bid_price": 123,
"bid_rate": 123,
"is_strike_bid": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: 123, bid_price: 123, bid_rate: 123, is_strike_bid: true})
};
fetch('https://ge-exchange-staging-1.herokuapp.com/v1/api/commitment/{commitmentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ge-exchange-staging-1.herokuapp.com/v1/api/commitment/{commitmentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 123,
'bid_price' => 123,
'bid_rate' => 123,
'is_strike_bid' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ge-exchange-staging-1.herokuapp.com/v1/api/commitment/{commitmentId}"
payload := strings.NewReader("{\n \"amount\": 123,\n \"bid_price\": 123,\n \"bid_rate\": 123,\n \"is_strike_bid\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://ge-exchange-staging-1.herokuapp.com/v1/api/commitment/{commitmentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"bid_price\": 123,\n \"bid_rate\": 123,\n \"is_strike_bid\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ge-exchange-staging-1.herokuapp.com/v1/api/commitment/{commitmentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 123,\n \"bid_price\": 123,\n \"bid_rate\": 123,\n \"is_strike_bid\": true\n}"
response = http.request(request)
puts response.read_bodyTrade
Amend a bid
Change the amount or limit on a live bid
PATCH
api
/
commitment
/
{commitmentId}
Amend a bid
curl --request PATCH \
--url https://ge-exchange-staging-1.herokuapp.com/v1/api/commitment/{commitmentId} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"amount": 123,
"bid_price": 123,
"bid_rate": 123,
"is_strike_bid": true
}
'import requests
url = "https://ge-exchange-staging-1.herokuapp.com/v1/api/commitment/{commitmentId}"
payload = {
"amount": 123,
"bid_price": 123,
"bid_rate": 123,
"is_strike_bid": True
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({amount: 123, bid_price: 123, bid_rate: 123, is_strike_bid: true})
};
fetch('https://ge-exchange-staging-1.herokuapp.com/v1/api/commitment/{commitmentId}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://ge-exchange-staging-1.herokuapp.com/v1/api/commitment/{commitmentId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'amount' => 123,
'bid_price' => 123,
'bid_rate' => 123,
'is_strike_bid' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://ge-exchange-staging-1.herokuapp.com/v1/api/commitment/{commitmentId}"
payload := strings.NewReader("{\n \"amount\": 123,\n \"bid_price\": 123,\n \"bid_rate\": 123,\n \"is_strike_bid\": true\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://ge-exchange-staging-1.herokuapp.com/v1/api/commitment/{commitmentId}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"amount\": 123,\n \"bid_price\": 123,\n \"bid_rate\": 123,\n \"is_strike_bid\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://ge-exchange-staging-1.herokuapp.com/v1/api/commitment/{commitmentId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"amount\": 123,\n \"bid_price\": 123,\n \"bid_rate\": 123,\n \"is_strike_bid\": true\n}"
response = http.request(request)
puts response.read_bodyChanges a live bid and adjusts the funds held to match. Send at least one field. The same
bounds apply as when the bid was placed.
string
required
The id of the commitment.
number
The new amount.
number
The new price limit. Mutually exclusive with
bid_rate.number
The new rate limit. Mutually exclusive with
bid_price.boolean
Convert to a strike bid, where allowed.
A bid cannot move between tranches — they have separate books, sizes and eligibility, so
moving is a withdrawal and a fresh bid rather than an edit. The field is not accepted here.
Was this page helpful?
