# New API commands

**URL:** https://forums.collective2.com/t/new-api-commands/4309
**Category:** C2
**Created:** [December 31, 2005, 3:07pm UTC](https://forums.collective2.com/t/new-api-commands/4309 "2005-12-31T15:07:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![MatthewKlein](https://yyz2.discourse-cdn.com/flex028/user_avatar/forums.collective2.com/matthewklein/32/21382_2.png) [@MatthewKlein](https://forums.collective2.com/u/MatthewKlein)
#### Post date: [December 31, 2005, 3:07pm UTC](https://forums.collective2.com/t/new-api-commands/4309/1 "2005-12-31T15:07:23Z")

</div>

Programmers using the Collective2 API to place trades automatically, I encourage you to look at the newest version of the API documentation (reachable via the link in the left menu bar that says API, or at [www.collective2.com/api](http://www.collective2.com/api)). The docs have been cleaned up a little, and, more important, several new commands have been introduced. These include:  
  
  
  
**cancelallpending** - cancels all pending orders  
  
  
  
**closeallpositions** - closes (at the market) all open positions  
  
  
  
**getbuypower** - request information about yoru system’s available buying power  
  
  
  
The ability to close all positions and cancel all trades at the touch of a button will also be introduced to the main Web site (that is, non-API users) when the new software version is released in the next week or so. I know a lot of users have requested these features, and they have been a long time coming.  
  
  
  
Matthew

---

<div class="post-metadata">

### Author: ![BrianMoore](https://avatars.discourse-cdn.com/v4/letter/b/eb9ed0/32.png) [@BrianMoore](https://forums.collective2.com/u/BrianMoore)
#### Post date: [December 31, 2005, 3:38pm UTC](https://forums.collective2.com/t/new-api-commands/4309/2 "2005-12-31T15:38:56Z")

</div>

MK,  
  
Great additions.  
  
I will be adding the Close all to my programs…but it looks like the close all has a sessionid that should not be there.  
  
  
  
Brian
