snaptrade 2.0.119 → 2.0.121
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/README.md +107 -108
- data/lib/snaptrade/api/trading_api.rb +214 -216
- data/lib/snaptrade/models/crypto_order_form.rb +321 -0
- data/lib/snaptrade/models/crypto_order_form_time_in_force.rb +39 -0
- data/lib/snaptrade/models/crypto_order_form_type.rb +41 -0
- data/lib/snaptrade/models/{simple_order_preview.rb → crypto_order_preview.rb} +4 -4
- data/lib/snaptrade/models/{simple_order_preview_estimated_fee.rb → crypto_order_preview_estimated_fee.rb} +3 -3
- data/lib/snaptrade/models/crypto_trading_instrument.rb +237 -0
- data/lib/snaptrade/models/crypto_trading_instrument_type.rb +37 -0
- data/lib/snaptrade/models/manual_trade_form_with_options.rb +1 -1
- data/lib/snaptrade/models/manual_trade_replace_form.rb +17 -2
- data/lib/snaptrade/version.rb +1 -1
- data/lib/snaptrade.rb +7 -2
- data/spec/api/trading_api_spec.rb +21 -22
- data/spec/models/crypto_order_form_spec.rb +77 -0
- data/spec/models/crypto_order_form_time_in_force_spec.rb +23 -0
- data/spec/models/crypto_order_form_type_spec.rb +23 -0
- data/spec/models/{simple_order_preview_estimated_fee_spec.rb → crypto_order_preview_estimated_fee_spec.rb} +6 -6
- data/spec/models/{simple_order_preview_spec.rb → crypto_order_preview_spec.rb} +6 -6
- data/spec/models/crypto_trading_instrument_spec.rb +35 -0
- data/spec/models/crypto_trading_instrument_type_spec.rb +23 -0
- data/spec/models/manual_trade_replace_form_spec.rb +6 -0
- metadata +157 -142
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c6d68c3bef6d28351d54a9f45678a5cfefc9b9391e9ab251e2a1fde13a1932d
|
4
|
+
data.tar.gz: d6a23c0e07e552ec7a3164b9726b4c9a17519e25adcc6b6cd3fb141ec1ae6c68
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 70c0c65c30a04eacf60727973d3b3090b28cfac3746b964c9884f64271705e304762d280b7fda101db556548e94a34e8262d17d83a0dc56ea6cc66688f6330b6
|
7
|
+
data.tar.gz: fd1a0091ab72a9e0ee4955fe64d8ae8cc96edc7a03fa2ffdaddf516cf043a901142980dca741929703522ea7ebdc44f4a3bab494819b630a65df65f8136f895c
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
snaptrade (2.0.
|
4
|
+
snaptrade (2.0.121)
|
5
5
|
faraday (>= 1.0.1, < 3.0)
|
6
6
|
faraday-multipart (~> 1.0, >= 1.0.4)
|
7
7
|
|
@@ -42,7 +42,7 @@ GEM
|
|
42
42
|
racc (1.8.1)
|
43
43
|
rainbow (3.1.1)
|
44
44
|
rake (13.0.6)
|
45
|
-
regexp_parser (2.
|
45
|
+
regexp_parser (2.11.0)
|
46
46
|
reline (0.6.2)
|
47
47
|
io-console (~> 0.5)
|
48
48
|
rexml (3.4.1)
|
data/README.md
CHANGED
@@ -6,7 +6,7 @@
|
|
6
6
|
|
7
7
|
Connect brokerage accounts to your app for live positions and trading
|
8
8
|
|
9
|
-
[](https://rubygems.org/gems/snaptrade/versions/2.0.121)
|
10
10
|
[](https://snaptrade.com/)
|
11
11
|
|
12
12
|
</div>
|
@@ -66,11 +66,11 @@ Connect brokerage accounts to your app for live positions and trading
|
|
66
66
|
* [`snaptrade.trading.get_order_impact`](#snaptradetradingget_order_impact)
|
67
67
|
* [`snaptrade.trading.get_user_account_quotes`](#snaptradetradingget_user_account_quotes)
|
68
68
|
* [`snaptrade.trading.place_bracket_order`](#snaptradetradingplace_bracket_order)
|
69
|
+
* [`snaptrade.trading.place_crypto_order`](#snaptradetradingplace_crypto_order)
|
69
70
|
* [`snaptrade.trading.place_force_order`](#snaptradetradingplace_force_order)
|
70
71
|
* [`snaptrade.trading.place_mleg_order`](#snaptradetradingplace_mleg_order)
|
71
72
|
* [`snaptrade.trading.place_order`](#snaptradetradingplace_order)
|
72
|
-
* [`snaptrade.trading.
|
73
|
-
* [`snaptrade.trading.preview_simple_order`](#snaptradetradingpreview_simple_order)
|
73
|
+
* [`snaptrade.trading.preview_crypto_order`](#snaptradetradingpreview_crypto_order)
|
74
74
|
* [`snaptrade.trading.replace_order`](#snaptradetradingreplace_order)
|
75
75
|
* [`snaptrade.trading.search_cryptocurrency_pair_instruments`](#snaptradetradingsearch_cryptocurrency_pair_instruments)
|
76
76
|
* [`snaptrade.transactions_and_reporting.get_activities`](#snaptradetransactions_and_reportingget_activities)
|
@@ -83,7 +83,7 @@ Connect brokerage accounts to your app for live positions and trading
|
|
83
83
|
Add to Gemfile:
|
84
84
|
|
85
85
|
```ruby
|
86
|
-
gem 'snaptrade', '~> 2.0.
|
86
|
+
gem 'snaptrade', '~> 2.0.121'
|
87
87
|
```
|
88
88
|
|
89
89
|
## Getting Started<a id="getting-started"></a>
|
@@ -1612,7 +1612,7 @@ The search query for symbols.
|
|
1612
1612
|
|
1613
1613
|
### `snaptrade.trading.cancel_order`<a id="snaptradetradingcancel_order"></a>
|
1614
1614
|
|
1615
|
-
Cancels an order in the specified account.
|
1615
|
+
Cancels an order in the specified account. Accepts order IDs for all asset types.
|
1616
1616
|
|
1617
1617
|
|
1618
1618
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
@@ -1650,7 +1650,9 @@ the brokerage system.
|
|
1650
1650
|
|
1651
1651
|
|
1652
1652
|
### `snaptrade.trading.cancel_user_account_order`<a id="snaptradetradingcancel_user_account_order"></a>
|
1653
|
+

|
1653
1654
|
|
1655
|
+
**This endpoint is deprecated. Please switch to [the new cancel order endpoint](/reference/Trading/Trading_cancelOrder) **
|
1654
1656
|
Attempts to cancel an open order with the brokerage. If the order is no longer cancellable, the request will be rejected.
|
1655
1657
|
|
1656
1658
|
|
@@ -1933,6 +1935,88 @@ Must be `null` if `notional_value` is provided.
|
|
1933
1935
|
---
|
1934
1936
|
|
1935
1937
|
|
1938
|
+
### `snaptrade.trading.place_crypto_order`<a id="snaptradetradingplace_crypto_order"></a>
|
1939
|
+
|
1940
|
+
Places an order in the specified account.
|
1941
|
+
This endpoint does not compute the impact to the account balance from the order before submitting the order.
|
1942
|
+
|
1943
|
+
|
1944
|
+
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
1945
|
+
|
1946
|
+
```ruby
|
1947
|
+
result = snaptrade.trading.place_crypto_order(
|
1948
|
+
instrument: {
|
1949
|
+
"symbol" => "BTC",
|
1950
|
+
"type" => "CRYPTOCURRENCY",
|
1951
|
+
},
|
1952
|
+
side: "BUY",
|
1953
|
+
type: "MARKET",
|
1954
|
+
time_in_force: "GTC",
|
1955
|
+
amount: "123.45",
|
1956
|
+
user_id: "snaptrade-user-123",
|
1957
|
+
user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
1958
|
+
account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
1959
|
+
limit_price: "123.45",
|
1960
|
+
stop_price: "123.45",
|
1961
|
+
post_only: false,
|
1962
|
+
expiration_date: "2024-01-01T00:00:00Z",
|
1963
|
+
)
|
1964
|
+
p result
|
1965
|
+
```
|
1966
|
+
|
1967
|
+
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
1968
|
+
|
1969
|
+
##### instrument: [`CryptoTradingInstrument`](./lib/snaptrade/models/crypto_trading_instrument.rb)<a id="instrument-cryptotradinginstrumentlibsnaptrademodelscrypto_trading_instrumentrb"></a>
|
1970
|
+
##### side: [`ActionStrict`](./lib/snaptrade/models/action_strict.rb)<a id="side-actionstrictlibsnaptrademodelsaction_strictrb"></a>
|
1971
|
+
The action describes the intent or side of a trade. This is either `BUY` or
|
1972
|
+
`SELL`.
|
1973
|
+
|
1974
|
+
##### type: [`CryptoOrderFormType`](./lib/snaptrade/models/crypto_order_form_type.rb)<a id="type-cryptoorderformtypelibsnaptrademodelscrypto_order_form_typerb"></a>
|
1975
|
+
The type of order to place.
|
1976
|
+
|
1977
|
+
##### time_in_force: [`CryptoOrderFormTimeInForce`](./lib/snaptrade/models/crypto_order_form_time_in_force.rb)<a id="time_in_force-cryptoorderformtimeinforcelibsnaptrademodelscrypto_order_form_time_in_forcerb"></a>
|
1978
|
+
The Time in Force type for the order. This field indicates how long the order
|
1979
|
+
will remain active before it is executed or expires. - `GTC` - Good Til
|
1980
|
+
Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or
|
1981
|
+
Kill. The order must be executed in its entirety immediately or be canceled
|
1982
|
+
completely. - `IOC` - Immediate Or Cancel. The order must be executed
|
1983
|
+
immediately. Any portion of the order that cannot be filled immediately will be
|
1984
|
+
canceled. - `GTD` - Good Til Date. The order is valid until the specified date.
|
1985
|
+
|
1986
|
+
##### amount: `Float`<a id="amount-float"></a>
|
1987
|
+
The amount of the base currency to buy or sell.
|
1988
|
+
|
1989
|
+
##### user_id: `String`<a id="user_id-string"></a>
|
1990
|
+
##### user_secret: `String`<a id="user_secret-string"></a>
|
1991
|
+
##### account_id: `String`<a id="account_id-string"></a>
|
1992
|
+
##### limit_price: `Float`<a id="limit_price-float"></a>
|
1993
|
+
The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT or
|
1994
|
+
TAKE_PROFIT_LIMIT.
|
1995
|
+
|
1996
|
+
##### stop_price: `Float`<a id="stop_price-float"></a>
|
1997
|
+
The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT,
|
1998
|
+
TAKE_PROFIT_MARKET or TAKE_PROFIT_LIMIT.
|
1999
|
+
|
2000
|
+
##### post_only: `Boolean`<a id="post_only-boolean"></a>
|
2001
|
+
Valid and required only for order type LIMIT. If true orders that would be
|
2002
|
+
filled immediately are rejected to avoid incurring TAKER fees.
|
2003
|
+
|
2004
|
+
##### expiration_date: `Time`<a id="expiration_date-time"></a>
|
2005
|
+
The expiration date of the order. Required if the time_in_force is GTD.
|
2006
|
+
|
2007
|
+
#### 🔄 Return<a id="🔄-return"></a>
|
2008
|
+
|
2009
|
+
[OrderUpdatedResponse](./lib/snaptrade/models/order_updated_response.rb)
|
2010
|
+
|
2011
|
+
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
2012
|
+
|
2013
|
+
`/accounts/{accountId}/trading/crypto` `POST`
|
2014
|
+
|
2015
|
+
[🔙 **Back to Table of Contents**](#table-of-contents)
|
2016
|
+
|
2017
|
+
---
|
2018
|
+
|
2019
|
+
|
1936
2020
|
### `snaptrade.trading.place_force_order`<a id="snaptradetradingplace_force_order"></a>
|
1937
2021
|
|
1938
2022
|
Places a brokerage order in the specified account. The order could be rejected by the brokerage if it is invalid or if the account does not have sufficient funds.
|
@@ -1953,7 +2037,7 @@ result = snaptrade.trading.place_force_order(
|
|
1953
2037
|
user_id: "snaptrade-user-123",
|
1954
2038
|
user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
1955
2039
|
universal_symbol_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
|
1956
|
-
symbol: "AAPL
|
2040
|
+
symbol: "AAPL",
|
1957
2041
|
price: 31.33,
|
1958
2042
|
stop: 31.33,
|
1959
2043
|
units: 10.5,
|
@@ -1995,12 +2079,8 @@ The universal symbol ID of the security to trade. Must be 'null' if `symbol` is
|
|
1995
2079
|
provided, otherwise must be provided.
|
1996
2080
|
|
1997
2081
|
##### symbol: `String`<a id="symbol-string"></a>
|
1998
|
-
The security's trading ticker symbol.
|
1999
|
-
|
2000
|
-
131124C00240000` represents a call option on AAPL expiring on 2024-11-13 with a
|
2001
|
-
strike price of $240. For more information on the OCC format, see
|
2002
|
-
[here](https://en.wikipedia.org/wiki/Option_symbol#OCC_format). If 'symbol' is
|
2003
|
-
provided, then 'universal_symbol_id' must be 'null'.
|
2082
|
+
The security's trading ticker symbol. If 'symbol' is provided, then
|
2083
|
+
'universal_symbol_id' must be 'null'.
|
2004
2084
|
|
2005
2085
|
##### price: `Float`<a id="price-float"></a>
|
2006
2086
|
The limit price for `Limit` and `StopLimit` orders.
|
@@ -2144,89 +2224,7 @@ before responding to the request.
|
|
2144
2224
|
---
|
2145
2225
|
|
2146
2226
|
|
2147
|
-
### `snaptrade.trading.
|
2148
|
-
|
2149
|
-
Places an order in the specified account.
|
2150
|
-
This endpoint does not compute the impact to the account balance from the order before submitting the order.
|
2151
|
-
|
2152
|
-
|
2153
|
-
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
2154
|
-
|
2155
|
-
```ruby
|
2156
|
-
result = snaptrade.trading.place_simple_order(
|
2157
|
-
instrument: {
|
2158
|
-
"symbol" => "AAPL",
|
2159
|
-
"type" => "EQUITY",
|
2160
|
-
},
|
2161
|
-
side: "BUY",
|
2162
|
-
type: "MARKET",
|
2163
|
-
time_in_force: "GTC",
|
2164
|
-
amount: "123.45",
|
2165
|
-
user_id: "snaptrade-user-123",
|
2166
|
-
user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
2167
|
-
account_id: "917c8734-8470-4a3e-a18f-57c3f2ee6631",
|
2168
|
-
limit_price: "123.45",
|
2169
|
-
stop_price: "123.45",
|
2170
|
-
post_only: false,
|
2171
|
-
expiration_date: "2024-01-01T00:00:00Z",
|
2172
|
-
)
|
2173
|
-
p result
|
2174
|
-
```
|
2175
|
-
|
2176
|
-
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
2177
|
-
|
2178
|
-
##### instrument: [`TradingInstrument`](./lib/snaptrade/models/trading_instrument.rb)<a id="instrument-tradinginstrumentlibsnaptrademodelstrading_instrumentrb"></a>
|
2179
|
-
##### side: [`ActionStrict`](./lib/snaptrade/models/action_strict.rb)<a id="side-actionstrictlibsnaptrademodelsaction_strictrb"></a>
|
2180
|
-
The action describes the intent or side of a trade. This is either `BUY` or
|
2181
|
-
`SELL`.
|
2182
|
-
|
2183
|
-
##### type: [`SimpleOrderFormType`](./lib/snaptrade/models/simple_order_form_type.rb)<a id="type-simpleorderformtypelibsnaptrademodelssimple_order_form_typerb"></a>
|
2184
|
-
The type of order to place.
|
2185
|
-
|
2186
|
-
##### time_in_force: [`SimpleOrderFormTimeInForce`](./lib/snaptrade/models/simple_order_form_time_in_force.rb)<a id="time_in_force-simpleorderformtimeinforcelibsnaptrademodelssimple_order_form_time_in_forcerb"></a>
|
2187
|
-
The Time in Force type for the order. This field indicates how long the order
|
2188
|
-
will remain active before it is executed or expires. - `GTC` - Good Til
|
2189
|
-
Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or
|
2190
|
-
Kill. The order must be executed in its entirety immediately or be canceled
|
2191
|
-
completely. - `IOC` - Immediate Or Cancel. The order must be executed
|
2192
|
-
immediately. Any portion of the order that cannot be filled immediately will be
|
2193
|
-
canceled. - `GTD` - Good Til Date. The order is valid until the specified date.
|
2194
|
-
|
2195
|
-
##### amount: `Float`<a id="amount-float"></a>
|
2196
|
-
The amount of the base currency to buy or sell.
|
2197
|
-
|
2198
|
-
##### user_id: `String`<a id="user_id-string"></a>
|
2199
|
-
##### user_secret: `String`<a id="user_secret-string"></a>
|
2200
|
-
##### account_id: `String`<a id="account_id-string"></a>
|
2201
|
-
##### limit_price: `Float`<a id="limit_price-float"></a>
|
2202
|
-
The limit price. Required if the order type is LIMIT, STOP_LOSS_LIMIT or
|
2203
|
-
TAKE_PROFIT_LIMIT.
|
2204
|
-
|
2205
|
-
##### stop_price: `Float`<a id="stop_price-float"></a>
|
2206
|
-
The stop price. Required if the order type is STOP_LOSS_MARKET, STOP_LOSS_LIMIT,
|
2207
|
-
TAKE_PROFIT_MARKET or TAKE_PROFIT_LIMIT.
|
2208
|
-
|
2209
|
-
##### post_only: `Boolean`<a id="post_only-boolean"></a>
|
2210
|
-
Valid and required only for order type LIMIT. If true orders that would be
|
2211
|
-
filled immediately are rejected to avoid incurring TAKER fees.
|
2212
|
-
|
2213
|
-
##### expiration_date: `Time`<a id="expiration_date-time"></a>
|
2214
|
-
The expiration date of the order. Required if the time_in_force is GTD.
|
2215
|
-
|
2216
|
-
#### 🔄 Return<a id="🔄-return"></a>
|
2217
|
-
|
2218
|
-
[OrderUpdatedResponse](./lib/snaptrade/models/order_updated_response.rb)
|
2219
|
-
|
2220
|
-
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
2221
|
-
|
2222
|
-
`/accounts/{accountId}/trading/simple` `POST`
|
2223
|
-
|
2224
|
-
[🔙 **Back to Table of Contents**](#table-of-contents)
|
2225
|
-
|
2226
|
-
---
|
2227
|
-
|
2228
|
-
|
2229
|
-
### `snaptrade.trading.preview_simple_order`<a id="snaptradetradingpreview_simple_order"></a>
|
2227
|
+
### `snaptrade.trading.preview_crypto_order`<a id="snaptradetradingpreview_crypto_order"></a>
|
2230
2228
|
|
2231
2229
|
Previews an order using the specified account.
|
2232
2230
|
|
@@ -2234,10 +2232,10 @@ Previews an order using the specified account.
|
|
2234
2232
|
#### 🛠️ Usage<a id="🛠️-usage"></a>
|
2235
2233
|
|
2236
2234
|
```ruby
|
2237
|
-
result = snaptrade.trading.
|
2235
|
+
result = snaptrade.trading.preview_crypto_order(
|
2238
2236
|
instrument: {
|
2239
|
-
"symbol" => "
|
2240
|
-
"type" => "
|
2237
|
+
"symbol" => "BTC",
|
2238
|
+
"type" => "CRYPTOCURRENCY",
|
2241
2239
|
},
|
2242
2240
|
side: "BUY",
|
2243
2241
|
type: "MARKET",
|
@@ -2256,15 +2254,15 @@ p result
|
|
2256
2254
|
|
2257
2255
|
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
2258
2256
|
|
2259
|
-
##### instrument: [`
|
2257
|
+
##### instrument: [`CryptoTradingInstrument`](./lib/snaptrade/models/crypto_trading_instrument.rb)<a id="instrument-cryptotradinginstrumentlibsnaptrademodelscrypto_trading_instrumentrb"></a>
|
2260
2258
|
##### side: [`ActionStrict`](./lib/snaptrade/models/action_strict.rb)<a id="side-actionstrictlibsnaptrademodelsaction_strictrb"></a>
|
2261
2259
|
The action describes the intent or side of a trade. This is either `BUY` or
|
2262
2260
|
`SELL`.
|
2263
2261
|
|
2264
|
-
##### type: [`
|
2262
|
+
##### type: [`CryptoOrderFormType`](./lib/snaptrade/models/crypto_order_form_type.rb)<a id="type-cryptoorderformtypelibsnaptrademodelscrypto_order_form_typerb"></a>
|
2265
2263
|
The type of order to place.
|
2266
2264
|
|
2267
|
-
##### time_in_force: [`
|
2265
|
+
##### time_in_force: [`CryptoOrderFormTimeInForce`](./lib/snaptrade/models/crypto_order_form_time_in_force.rb)<a id="time_in_force-cryptoorderformtimeinforcelibsnaptrademodelscrypto_order_form_time_in_forcerb"></a>
|
2268
2266
|
The Time in Force type for the order. This field indicates how long the order
|
2269
2267
|
will remain active before it is executed or expires. - `GTC` - Good Til
|
2270
2268
|
Canceled. The order is valid until it is executed or canceled. - `FOK` - Fill Or
|
@@ -2296,11 +2294,11 @@ The expiration date of the order. Required if the time_in_force is GTD.
|
|
2296
2294
|
|
2297
2295
|
#### 🔄 Return<a id="🔄-return"></a>
|
2298
2296
|
|
2299
|
-
[
|
2297
|
+
[CryptoOrderPreview](./lib/snaptrade/models/crypto_order_preview.rb)
|
2300
2298
|
|
2301
2299
|
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
2302
2300
|
|
2303
|
-
`/accounts/{accountId}/trading/
|
2301
|
+
`/accounts/{accountId}/trading/crypto/preview` `POST`
|
2304
2302
|
|
2305
2303
|
[🔙 **Back to Table of Contents**](#table-of-contents)
|
2306
2304
|
|
@@ -2318,11 +2316,11 @@ returned in the response going forward. Only supported on some brokerages
|
|
2318
2316
|
|
2319
2317
|
```ruby
|
2320
2318
|
result = snaptrade.trading.replace_order(
|
2319
|
+
brokerage_order_id: "66a033fa-da74-4fcf-b527-feefdec9257e",
|
2321
2320
|
action: "BUY",
|
2322
2321
|
order_type: "Market",
|
2323
2322
|
time_in_force: "Day",
|
2324
2323
|
account_id: "2bcd7cc3-e922-4976-bce1-9858296801c3",
|
2325
|
-
brokerage_order_id: "66a033fa-da74-4fcf-b527-feefdec9257e",
|
2326
2324
|
user_id: "snaptrade-user-123",
|
2327
2325
|
user_secret: "adf2aa34-8219-40f7-a6b3-60156985cc61",
|
2328
2326
|
price: 31.33,
|
@@ -2335,6 +2333,10 @@ p result
|
|
2335
2333
|
|
2336
2334
|
#### ⚙️ Parameters<a id="⚙️-parameters"></a>
|
2337
2335
|
|
2336
|
+
##### brokerage_order_id: `String`<a id="brokerage_order_id-string"></a>
|
2337
|
+
Order ID returned by brokerage. This is the unique identifier for the order in
|
2338
|
+
the brokerage system.
|
2339
|
+
|
2338
2340
|
##### action: [`ActionStrict`](./lib/snaptrade/models/action_strict.rb)<a id="action-actionstrictlibsnaptrademodelsaction_strictrb"></a>
|
2339
2341
|
The action describes the intent or side of a trade. This is either `BUY` or
|
2340
2342
|
`SELL`.
|
@@ -2357,9 +2359,6 @@ immediately will be canceled.
|
|
2357
2359
|
##### account_id: `String`<a id="account_id-string"></a>
|
2358
2360
|
The ID of the account to execute the trade on.
|
2359
2361
|
|
2360
|
-
##### brokerage_order_id: `String`<a id="brokerage_order_id-string"></a>
|
2361
|
-
The Brokerage Order ID of the order to replace.
|
2362
|
-
|
2363
2362
|
##### user_id: `String`<a id="user_id-string"></a>
|
2364
2363
|
##### user_secret: `String`<a id="user_secret-string"></a>
|
2365
2364
|
##### price: `Float`<a id="price-float"></a>
|
@@ -2378,7 +2377,7 @@ The price at which a stop order is triggered for `Stop` and `StopLimit` orders.
|
|
2378
2377
|
|
2379
2378
|
#### 🌐 Endpoint<a id="🌐-endpoint"></a>
|
2380
2379
|
|
2381
|
-
`/accounts/{accountId}/trading/
|
2380
|
+
`/accounts/{accountId}/trading/replace` `POST`
|
2382
2381
|
|
2383
2382
|
[🔙 **Back to Table of Contents**](#table-of-contents)
|
2384
2383
|
|